在Visual C#中使用XML指南之读取XML(3)
以下是用于测试的XML文件:
在项目中新建一个XML文件取名为sample.xml,建好后把该文件拷到项目的bin目录下的Debug目录下
<?xml version="1.0" encoding="utf-8" ?>
<Invoices date="28/11/2001" xmlns:cat="uri:Business-Categories">
<customers custname="Chile Wines Inc" phone="1241 923 56332" email="cw@yahoo.com.cn" custid="192398" delivery="international" offerID="27">
<cat:businfo>Wine Division South</cat:businfo>
<cat:businfo>Beer Division North</cat:businfo>
<order orderID="OID921" batchid="123">
<details>
<items cat:num="2">
<item>Rancagua While</item>
<item>Rancagua Red</item>
</items>
</details>
</order>
<order orderID="OID927">
<details>
<items num="5">
<item>Chillan Red</item>
<item>Rancagua While</item>
<item>Santiago Red</item>
<item>Rancagua While</item>
<item>Rancagua Red</item>
</items>
</details>
</order>
<order orderID="OID931" batchid="123">
<details>
<items num="6">
<item>Rancegao Red</item>
<item>Sutothad Black</item>
<item>BlackNme Blue</item>
<item>Booklist Red</item>
<item>Rancegao White</item>
</items>
</details>
</order>
</customers>
</Invoices>
在项目中新建一个XML文件取名为sample.xml,建好后把该文件拷到项目的bin目录下的Debug目录下
浙公网安备 33010602011771号