The note element is a complex type element because it contains other elements.
The other elements (to, from, heading, body) are simple types because they do not contain other elements.
You will learn more about simple and complex types in the following chapters
A Reference to a DTD
This XML document has reference to the DTD:
<?xml version="1.0"?>
<!DOCTYPE note SYSTEM
"http://www.academictutorials.com/dtd/note.dtd">
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
A Reference to an XML Schema
This XML document has a reference to an XML Schemas:
<?xml version="1.0"?>
<note
xmlns="http://www.academictutorials.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.academictutorials.com note.xsd">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
how to use xschema,use instead of,how to use xml,how to use xsd,how to use jar,how to use wsdl,how to use soap,how to use xsl ,how to use xslt,how to use format,how to use sql,usage use