I'm not an expert on XML so have a question I have been unable to find an
answer. I have a fairly complex XSD file that was provided to me, for which
I used XSD.exe to generate a class. I added both the class and xsd files to
a C# VS 2005 project (Not Web Site). I need to create an XmlDocument that
will be populated with values and passed to a Web Service, where additional
elements will be populated and returned. I am at a complete loss as to how
to create the document from the class or xsd file.
For example, I tried the following:
LXML lxml = new LXML(); // NOTE: LXML is the class genererated from the
XSD file
XmlDocument doc = new XmlDocument();
doc.LoadXml(lxml.ToString());
It compiles, but chokes at runtime... looking nothing like an XML document.
Anyone know how this can be done... or IF it can be done?