Vuppala
Vuppala

Reputation:

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

Upvotes: 1

Views: 320

Answers (2)

S.Lott
S.Lott

Reputation: 391952

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.

Upvotes: 0

Jesper Fyhr Knudsen
Jesper Fyhr Knudsen

Reputation: 7937

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

Upvotes: 1

Related Questions