tags:

views:

128

answers:

2
+1  Q: 

XML schema

I've a schema file (.xsd), I'd like to generate a xml document using this schema. Is there any online tool available,if not what is quickest way (like couple of lines of code using vb.net).

Thanks for your help.

-Vuppala

+1  A: 

If I'm understanding you correct, this tool might help.

XML Generator

It's what I usually use when working with XML.

If you want a solution through code you can use this:

XmlTextWriter textWriter = new XmlTextWriter("po.xml", null);
textWriter.Formatting    = Formatting.Indented;
XmlQualifiedName qname   = new XmlQualifiedName("PurchaseOrder",       
                           "http://tempuri.org");
XmlSampleGenerator generator = new XmlSampleGenerator("po.xsd", qname);
genr.WriteXml(textWriter);

Taken from MSDN

Arkain
A: 

Download pyXSD.

Use it to build Python class definitions from the XSD's.

Build objects from those class definitions.

Save the Python objects in XML notation.

An alternative is GenerateDS.

S.Lott