http://vinbhat.wordpress.com/2008/08/19/exporting-data-creating-xml-files-using-c/
*****************************************************************************
http://www.stjhimy.com/2009/10/17/playing-around-with-xmls-and-xsds-net-smiles-for-you/
****************************************************************************
http://www.switchonthecode.com/tutorials/csharp-tutorial-xml-serialization
***
XmlSerializer serializer = new XmlSerializer(typeof(DES.DES));
TextWriter textWriter = new StreamWriter(_fileName);
serializer.Serialize(textWriter, objdes);
textWriter.Close();
*********************************************************************
http://www.csharper.net/blog/serializing_without_the_namespace__xmlns__xmlns_xsd__xmlns_xsi_.aspx
***
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
using (XmlWriter writer = XmlWriter.Create(_fileName, settings))
{
XmlSerializer serializer = new XmlSerializer(typeof(DES.DES));
XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces();
namespaces.Add("", "http://www.mto.gov.on.ca/rus/des/batch-input");
serializer.Serialize(writer, objdes, namespaces);
}
No comments:
Post a Comment