XSD的學習,下面鏈接上有詳細的XSD學習資料,
http://www.w3pop.com/learn/view/p/1/o/0/doc/schema_facets/
www.w3pop.com這網(wǎng)站上有與XML/HTML相關的詳細資料。
在Myeclipse編寫XSD文件非常的主法,只需要把與XSD相關的元素記住就行,像編輯XML一樣,并且有提示,還可以根據(jù)XSD文件建立XML文件。這是一個隨便寫的XSD文件
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/note" xmlns:tns="http://www.example.org/note">
<element name="note">
<complexType>
<attribute name="id" type="integer" use="required" />
<sequence>
<element name="to" >
<simpleType>
<restriction base="integer">
<minInclusive value="0"></minInclusive>
<maxInclusive value="100"></maxInclusive>
</restriction>
</simpleType>
</element>
<element name="from" type="string"/>
<element name="heading" type="string"/>
<element name="body" type="string"/>
</sequence>
</complexType>
</element>
</schema>
posted on 2007-10-11 22:45
有貓相伴的日子 閱讀(664)
評論(0) 編輯 收藏 所屬分類:
XML/json相關技術