views:

12

answers:

1

How to get XmlSchema object from large string that contains all Xsd content?

Thanks.

+1  A: 

You can use a StringReader:

string content = ".......";
XmlSchema schema = new XmlSchema();
schema.Read(new StringReader(content), ValidateSchema);
Frédéric Hamidi
Exactly, just it will fail if content has include tag when you try validate xml with this schema, because you must first add all includes then the most parent xsd, which is not case when you use URI. Thanks.
SonOfOmer