참고사이트: http://www.scitech.co.kr/upload/book_image/s_017/Xml04.pdf
<DTD>
<!DOCTYPE Memo [
<!ELEMENT Memo (PInfo, MInfo)>
<!ELEMENT PInfo (from, to)>
<!ELEMENT MInfo (date, main)>
<!ELEMENT form (#PCDATA)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT main (#PCDATA)>
]>
DTD를 이용한 XML: REF사이트
<XML XSD> : XML Schema Definition.
<?xml version="1.0" encoding="EUC-KR"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.lisia.net"
xmlns="http://www.lisia.net"
elementFormDefault="qualified">
<xsd:element name="Memo">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PInfo">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="from type="xsd:string"/>
<xsd:element name="to" type="xsd:string"/>
</xsd:sequence>
==> XSD 를 이용한 XML
<?xml version="1.0" encoding="EUC-KR"?>
<Memo xmlns="http://www.lisia.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.lisia.net ex4_3.xsd">
<PInfo>
<from>김광수</from>
<to>박수란</to>
</PInfo>