Using XSD file in VS2005

Posted by xt_20 on Stack Overflow See other posts from Stack Overflow or by xt_20
Published on 2010-05-18T06:21:22Z Indexed on 2010/05/18 6:50 UTC
Read the original article Hit count: 275

Hello all

I want to write an XML file. I have created an XSD file named XMLSchema.xsd, and run the command 'xsd /c XMLSchema.xsd' which generated a c# class file. Now, how do I use this file to generate XML files?

Part of my code:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="XMLSchema" targetNamespace="http://tempuri.org/XMLSchema.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd" >
<xs:element name="root">
   <xs:complexType>
      <xs:sequence>
         <xs:element name="Audit">
            <xs:complexType>
               ...

which generates a c# class 'root'.

How do I call 'root' from my C# web program?

Thanks

© Stack Overflow or respective owner

Related posts about xml-serialization

Related posts about Xml