Generate XML from XSD

G

Guest

Hi,
My application has to generate dynamically XMLs from any schema. The
application doesn't know the shema structure, only the name of the .xsd file.
So I would like to generate an empty XML from given XSD. Could anybody tell
me how I can do this in .NET Studio?

Thanks,
Mary
 
R

Richard P

Mary

I can't remember the precise mechanics but I think you can achieve want you
want to do by using Dataset methods.

you create a dataset ds, ds.ReadSchema(); ds.GetXML();

Manipulating the XML is easier if you then convert the dataset into an
XmlDataDocument.

I think it can be awkward creating an XML file of with a full set of empty
tags if the schema elements are optional. I think there is a property you
can set to include empty tags (or is that in the XmlTextWriter?)

-R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top