This section assumes that schema, is present in local system.
For validating XML through schema, you have to specify below two attributes in root element of XML document.
1. Using absolute path
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.example.com/ file://C:/schema/test/SampleOne.xsd'
2. Using relative path
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.example.com/ ./SampleOne.xsd'
Suggested Reading
http://www.wrox.com/WileyCDA/Section/Editing-XML-and-XML-Schema-in-Visual-Studio-2008.id-320326.html
Sunday, August 22, 2010
Subscribe to:
Posts (Atom)