>>I have this good sized xsd file I created (219 lines long). It is supposed
>>to be a representation of a contract a business uses. I need to know what
[quoted text clipped - 10 lines]
> will be xml and conform to the schema that you originally described in the
> xsd.
> How do you use the XmlSerializer?
Like this:
using System.Xml.Serialization;
using System.IO;
...
TheClass myInstance = new TheClass();
myInstance.someField = theValue;
...
XmlSerializer serializer = new XmlSerializer(typeof(TheClass));
TextWriter writer = new StreamWriter(@"C:\TEMP\TheFile.xml");
serializer.Serialize(writer, myInstance);
writer.Close();
Fabricio - 31 Mar 2008 14:47 GMT
On Mar 31, 4:25 am, "Alberto Poblacion" <earthling-
quitaestoparacontes...@poblacion.org> wrote:
> > How do you use the XmlSerializer?
>
[quoted text clipped - 12 lines]
> serializer.Serialize(writer, myInstance);
> writer.Close();
You can have another option:
Use this XSD file as a Dataset file, if possible.
Then you can work with XML files using Dataset methods (WriteXML and
ReadXML, i guess).
So, the XML file works as a table and its rows.