Hi Emily
You need a layered approach here. Use the XmlTextReader on your stream, then
construct a ValidatingXmlReader using the TextReader, and then pass the
validating reader through to the Load method of your XmlDocument.
Code like this:
Dim t As New Xml.XmlTextReader(stream)
Dim v As New Xml.XmlValidatingReader(t)
Dim doc As New Xml.XmlDocument
doc.Load(v)
HTH
Nigel
"Emily John" wrote:
I am using xml serialization to generate my xml document. I am getting
the data as stream of memory and then converting it to xml document
object without saving it to the file system.
How do I validate this memory stream of data at load time with xml
schema ?
I may have to validate with multiple schemas at a later time.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!