XML課本程序代碼-第四章例題_第1頁
XML課本程序代碼-第四章例題_第2頁
XML課本程序代碼-第四章例題_第3頁
XML課本程序代碼-第四章例題_第4頁
XML課本程序代碼-第四章例題_第5頁
已閱讀5頁,還剩12頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

XML課本程序代碼-第四章例題XML課本程序代碼-第四章例題XML課本程序代碼-第四章例題xxx公司XML課本程序代碼-第四章例題文件編號(hào):文件日期:修訂次數(shù):第1.0次更改批準(zhǔn)審核制定方案設(shè)計(jì),管理制度<xmlversion=""encoding="UTF-8"><!--NewdocumentcreatedwithEditiXatThuMar2211:37:13CST2012--><!DOCTYPEorderSYSTEM""><order> <order_id></order_id> <amount></amount> <credit_card> <card_type>Visa</card_type> <card_num>4111*******1111</card_num> </credit_card> <date>02-03-2009</date> <customer> <name>JonhSmith</name> <phonephone_type="home">4</phone> </customer> <shipping_addr> <street>5050MapleStreet</street> <city>Toronto</city> <province>Ontario</province> <country>Canada</country> </shipping_addr> <comment> TheordersystemisforCanadiancustomersonly. </comment></order><!ELEMENTorder(order_id,amount,credit_card,date,customer,shipping_addr,comment)><!ELEMENTorder_id(#PCDATA)><!ELEMENTamount(#PCDATA)><!ELEMENTcredit_card(card_type,card_num)><!ELEMENTcard_type(#PCDATA)><!ELEMENTcard_num(#PCDATA)><!ELEMENTdate(#PCDATA)><!ELEMENTcustomer(name,phone)><!ELEMENTname(#PCDATA)><!ELEMENTphone(#PCDATA)><!ELEMENTshipping_addr(street,city,province,country)><!ELEMENTstreet(#PCDATA)><!ELEMENTcity(#PCDATA)><!ELEMENTprovince(#PCDATA)><!ELEMENTcountry(#PCDATA)><!ELEMENTcomment(#PCDATA)><!ATTLISTphonephone_type(home|work|mobile)#REQUIRED><xmlversion=""encoding="UTF-8"><countries xmlns:xsi="" xsi:noNamespaceSchemaLocation=""> <country>Canada</country> <country>China </country> <country>UnitedStates</country></countries><xmlversion=""encoding="UTF-8"><!--NewdocumentcreatedwithEditiXatThuMar2211:44:46CST2012--><xs:schemaxmlns:xs=""> <xs:elementname="countries"> <xs:complexType> <xs:sequence> <xs:elementname="country"type="xs:string"minOccurs="1"maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element></xs:schema><xmlversion=""encoding="UTF-8"><olympicxmlns:xsi="" xsi:noNamespaceSchemaLocation=""> <resultsyear="2008"city="beijing"> <countrycode="CHN"name="China"rank="1"gold="51"/> <countrycode="USA"name="UnitedStates"rank="2"gold="36"/> <countrycode="RUS"name="Russia"rank="3"gold="23"/> </results> <resultsyear="2004"city="Athens"> <countrycode="USA"name="UnitedStates"rank="1"gold="36"/> <countrycode="CHN"name="China"rank="2"gold="32"/> <countrycode="RUS"name="Rusiia"rank="3"gold="27"/> </results> </olympic><xmlversion=""encoding="UTF-8"><xs:schemaxmlns:xs=""> <xs:elementname="olympic"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"name="results"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"ref="country"/> </xs:sequence> <xs:attributeGroupref="results_attributes"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:elementname="country"> <xs:complexType> <xs:attributeGroupref="country_attributes"/> </xs:complexType> </xs:element> <xs:attributeGroupname="results_attributes"> <xs:attributename="city"type="xs:string"use="required"/> <xs:attributename="year"type="xs:integer"use="required"/> </xs:attributeGroup> <xs:attributeGroupname="country_attributes"> <xs:attributename="gold"type="xs:integer"use="required"/> <xs:attributename="rank"type="xs:integer"use="required"/> <xs:attributename="name"type="xs:string"use="required"/> <xs:attributename="code"type="xs:string"use="required"/> </xs:attributeGroup></xs:schema><xmlversion=""encoding="UTF-8"><c:countries xmlns:xsi="" xmlns:c="xml/demos" xsi:schemaLocation="xml/demos"> <country>Canada</country>溫碧泉 <country>China </country> <country>UnitedStates</country> </c:countries><xmlversion=""encoding="UTF-8"><xs:schematargetNamespace="xml/demos"xmlns:xs=""> <xs:elementname="countries"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"name="country"type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element></xs:schema>4_10<xmlversion=""encoding="UTF-8"><xs:schemaxmlns:xs="" targetNamespace="xml/demos"> <xs:elementname="olympic"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"name="results"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"ref="country"/> </xs:sequence> <xs:attributeGroupref="results_attributes"/><!--引用的是一個(gè)不具有名稱空間的組件!--> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:elementname="country"> <xs:complexType> <xs:attributeGroupref="country_attributes"/><!--引用的是一個(gè)不具有名稱空間的組件!--> </xs:complexType> </xs:element> <xs:attributeGroupname="results_attributes"> <xs:attributename="city"type="xs:string"use="required"/> <xs:attributename="year"type="xs:integer"use="required"/> </xs:attributeGroup> <xs:attributeGroupname="country_attributes"> <xs:attributename="gold"type="xs:integer"use="required"/> <xs:attributename="rank"type="xs:integer"use="required"/> <xs:attributename="name"type="xs:string"use="required"/> <xs:attributename="code"type="xs:string"use="required"/> </xs:attributeGroup></xs:schema>4_11<xmlversion=""encoding="UTF-8"><xs:schemaxmlns:xs="" xmlns:c="xml/demos" targetNamespace="xml/demos"> <xs:elementname="olympic"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"name="results"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"ref="c:country"/> </xs:sequence> <xs:attributeGroupref="c:results_attributes"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:elementname="country"> <xs:complexType> <xs:attributeGroupref="c:country_attributes"/> </xs:complexType> </xs:element> <xs:attributeGroupname="results_attributes"> <xs:attributename="city"type="xs:string"use="required"/> <xs:attributename="year"type="xs:integer"use="required"/> </xs:attributeGroup> <xs:attributeGroupname="country_attributes"> <xs:attributename="gold"type="xs:integer"use="required"/> <xs:attributename="rank"type="xs:integer"use="required"/> <xs:attributename="name"type="xs:string"use="required"/> <xs:attributename="code"type="xs:string"use="required"/> </xs:attributeGroup></xs:schema><xmlversion=""encoding="UTF-8"><xs:schemaxmlns:xs=""> <xs:elementname="olympic"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"name="results"> <xs:complexType> <xs:sequence> <xs:elementmaxOccurs="unbounded"minOccurs="1"ref="country"/> </xs:sequence> <xs:attributeGroupref="results_attributes"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:elementname="country"> <xs:complexType> <xs:attributename="gold"type="xs:integer"use="required"/> <xs:attributename="rank"type="xs:integer"use="required"/> <xs:attributename="name"type="xs:string"use="required"/> <xs:attributename="code"type="xs:string"use="required"/> </xs:complexType> </xs:element> <xs:attributeGroupname="results_attributes"> <xs:attributename="city"type="xs:string"use="required"/> <xs:attributename="year"type="xs:integer"use="required"/> </xs:attributeGroup></xs:schema><xmlversion=""encoding="UTF-8"><orderxmlns:xsi="" xsi:noNamespaceSchemaLocation=""> <order_id></order_id> <amount></amount> <credit_card> <card_type>Visa</card_type> <card_num>4111*******1111</card_num> </credit_card> <date>02-03-2009</date> <customer> <name>JonhSmith</name> <phonephone_type="home">4</phone> </customer> <shipping_addr> <street>5050MapleStreet</street> <city>Toronto</city> <province>Ontario</province> <country>Canada</country> </shipping_addr> <comment> TheordersystemisforCanadiancustomersonly. </comment></order><xmlversion=""encoding="UTF-8"><xs:schemaxmlns:xs=""> <xs:elementname="order"> <xs:complexType> <xs:sequence> <xs:elementname="order_id"type="xs:string"/> <xs:elementname="amount"type="xs:string"/> <xs:elementref="credit_card"/> <xs:elementname="date"type="xs:string"/> <xs:elementref="customer"/> <xs:elementref="shipping_addr"/> <xs:elementname="comment"type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexTypename="credit_card_type"> <xs:sequence> <xs:elementname="card_type"type="xs:string"/> <xs:elementname="card_num"type="xs:string"/> </xs:sequence> </xs:complexType> <xs:elementname="credit_card"type="credit_card_type"/> <xs:complexTypename="customer"> <xs:sequence> <xs:elementname="name"type="xs:string"/> <xs:elementname="phone"> <xs:complexType> <xs:simpleContent> <xs:extensionbase="xs:string"> <xs:attributename="phone_type"type="xs:string"use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:elementname="customer"type="customer"/> <xs:complexTypename="address"> <xs:sequence> <xs:elementname="street"type="xs:string"/> <xs:elementname="city"type="xs:string"/> <xs:elementname="province"type="xs:string"/> <xs:elementname="country"type="xs:string"/> </xs:sequence> </xs:complexType> <xs:elementname="shipping_addr"type="address"/></xs:schema><xmlversion=""encoding="UTF-8"><customs_declaration xmlns:xsi="" xsi:noNamespaceSchemaLocation=""> <enter>Canada</enter> <passenger>JohnSmith</passenger> <absenceunit="day">21</absence> <goods_valueunit="CAD">500</goods_value> <cigrettes>200</cigrettes> <alcoholic_beverageunit="litre"></alcoholic_beverage></customs_declaration><xmlversion=""encoding="UTF-8"><xs:schemaxmlns:xs=""> <xs:elementname="customs_declaration"> <xs:complexType> <xs:sequence> <xs:elementname="enter"type="xs:string"/> <xs:elementname="passenger"type="xs:string"/> <xs:elementname="absence"> <xs:complexType> <xs:simpleContent> <xs:extensionbase="absence_type"> <xs:attributename="unit"type="xs:string"use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:elementname="goods_value"> <xs:complexType> <xs:simpleContent> <xs:ext

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論