What is XML Schema Element
Posted in
XML | DTD July 06, 2019
This article teach you about XML Schema Element in XML
Schema element
It is the base element or root element of every XML Schema document. And it is contain some Attributes constraint element within Schema opening and closing tag.
Example:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema>
……….
……….
……..
</xs:schema>
|
Note: Above declared code is the example of XML Schema. Which define the Schema Element.
Schema Attributes
Schema element contain also some Attributes, Within the Schema opening tag Example
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="https://dotnetheaven.com"
xmlns="https://dotnetheaven.com"
elementFormDefault="qualified">
...
...
</xs:schema>
|
But in above declared XML Schema the part
mlns:xs="http://www.w3.org/2001/XMLSchema"
|
Show that the elements and it's data types used in the XML schema come from the "http://www.w3.org/2001/XMLSchema" namespace. And it is also indicate that before the xmlns:xs=http://www.w3.org/2001/XMLSachem used XS:
This part of XML schema
targetNamespace="https://dotnetheaven.com"
|
Show that element declared in this schema ( note , to, from, heading, body.) come from the
"https://dotnetheaven.com" namespace
This part of XML schema
xmlns="https://dotnetheaven.com"
|
Show that default Namespace is "https://dotnetheaven.com"
This part of XML schema
elementFormDefault="qualified
|
Show that any element used in the XML document must be declared in the namespace qualified
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