Use of Refrences Schema in XML

This article teach you how to references Schema in XML Document
  • 2043

Add Schema in an XML Document

It is also possible that we can referencing XML Schema in XML document

<?xml version="1.0"?>
<note xmlns=""
xsi:schemaLocation=" note.xsd">
<heading>Remember me</heading>
<body>Don't forget me this year</body>

Note: In the above declared code.



This indicate that default namespace declaration. it tells us the schema-vaidator and that all elements declared in XML document  in the xmlns="" namespace.




we can use the Schema-Location or Schema-instance attributes. This attributes always comes in the two value. first one is name and second it's value. And it separated by space, the first value contain namespace and second value contain location.



xsi:schemaLocation=" note.xsd"

Further Readings

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.