Using the XmlReaderSettings Class
Select an XML document:
slides.xml
slides-invalid-content.xml
slides-invalid-structure.xml
slides-fragment.xml
slides-invalid-fragment.xml
does-not-exist.xml
Validate the XML document or fragment against the schema(s)
Add a ValidationEventHandler to the XmlReaderSettings
Report validation warnings as well as validation errors
Set the conformance level to Fragment and create an XmlParserContext
Use an XmlResolver to block access to all folders
Allow access to the folder containing the XML file
[
view source
]
©2005
Dave And Al
,
Stonebroom Limited
, England.