monitor repair

camcorder repair

free repair newsletter

XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 2 U (http://www.xmlspy.com) by skm (skm) -->
<ACCOUNTINFORMATION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\Programming\XML\UGP1\5\email.xsd">
<MAIL>
<MAILTYPE>Mail</MAILTYPE>
<FROM>[email protected]</FROM>
<SUBJECT>Hi</SUBJECT>
<DATE>2002-12-12</DATE>
<PRIORITY>Low</PRIORITY>
</MAIL>
<ADDRESSBOOK>
<NAME>Suresh</NAME>
<NICKNAME>skm</NICKNAME>
<EMAIL>[email protected]</EMAIL>
</ADDRESSBOOK>
</ACCOUNTINFORMATION>
 

XSD

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="ACCOUNTINFORMATION" type="information"/>
<xsd:complexType name="information">
<xsd:sequence>
<xsd:element name="MAIL" type="mail"/>
<xsd:element name="ADDRESSBOOK" type="add"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="mail">
<xsd:sequence>
<xsd:element name="MAILTYPE" type="mytype"/>
<xsd:element name="FROM" type="xsd:string"/>
<xsd:element name="SUBJECT" type="xsd:string"/>
<xsd:element name="DATE" type="xsd:date"/>
<xsd:element name="PRIORITY" type="prev"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="add">
<xsd:sequence>
<xsd:element name="NAME" type="xsd:string"/>
<xsd:element name="NICKNAME" type="xsd:string"/>
<xsd:element name="EMAIL" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="mytype">
<xsd:restriction base="xsd:string">
<xsd:pattern value="(Mail{1}|News{1})"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="prev">
<xsd:restriction base="xsd:string">
<xsd:pattern value="(High{1}|Low{1}|Medium{1})"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>