Help: Create schema dynamically from a valid XML string?

G

Geoff Moller

Hi All

I think I am attempting a little chicken before the egg, but I am
trying:

XmlDataDocument parsedErrorDoc = new XmlDataDocument();
parsedErrorDoc.LoadXml(strXML); //where strXML is a valid xml string
string schema = parsedErrorDoc.DataSet.GetXmlSchema();
parsedErrorDoc.DataSet.ReadXmlSchema(schema);

So I suppose that the dataset doesn't have a schema to return,
correct?
Is there anyway to programtically generate a schema from a string of
valid xml, then apply said schema to the XmlDataDocument's dataset?
Or must I load the XmlDataDocument's dataset with a schema first, at
all times?

Thanks for any help!

Geoff Moller
(e-mail address removed)
 
S

Scot Rose [MSFT]

313826 INFO: Roadmap for XML Schemas in the .NET Framework
http://support.microsoft.com/?id=313826

There is a section on programmaticaly creating a Schema Definition...


Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
 

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