스키마 문서 작성 xml 문서>~. xml <? xml version=“ 1. 0” encoding=“euc-kr”? > <memberlist xmlns: xsi=“http: //www. w 3. org/2001/XMLSchemainstance” xsi: no. Namespace. Schema. Location=“c1. xsd”> 회원에 대한 내용이 온다. </memberlist> 요소 선언 1. 단순 데이터를 갖는 요소 <element name=“요소명” min. Occurs=“최소횟수” max. Occurs=“최 대횟수” type=“데이터형”>
스키마 문서 작성 xsd> <element name=“name” min. Occurs=“ 0” max. Occurs=“ 3” type=“xsd: string”/> xml> <name>오정원</name> <name>이나라</name> 숫자형 데이터 타입 : type=“xsd: int” 요소를 무한대로 나열 : max. Occurs=“unbounded”
스키마 문서 작성 xsd> <xsd: element name=“member”> <xsd: complex. Type> <xsd: sequence> <xsd: element name=“hobby” min. Occurs=“ 0” max. Occurs=“unbounded” type=“xsd: string”/> </xsd: sequence> </xsd: complex. Type> </xsd: element>