Write a program which describe XML document and corresponding Schema.(for simple types)
CODING:
.XML FILE:
<?xml version="1.0" encoding="UTF-8"?>
<message
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="DHTML_XML4_5.xsd">
Hey buddy!
</message>
.XSD FILE:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="message" type="xsd:string"/>
</xsd:schema>
CODING:
.XML FILE:
<?xml version="1.0" encoding="UTF-8"?>
<message
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="DHTML_XML4_5.xsd">
Hey buddy!
</message>
.XSD FILE:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="message" type="xsd:string"/>
</xsd:schema>
Comments
Post a Comment