解析一個沒有模式的大XML文件(2MB-20MB或更多)將採取什麼樣的路徑(由於文件結構很奇怪,我不能推斷出一個使用XSD.exe,檢查下面的代碼段)?解析第三方XML
選項
1)XML反序列化(但正如所說,我沒有一個模式和XSD工具抱怨文件內容), 2)的LINQ to XML, 3)加載到XmlDocument的, 4)用XmlReader手動解析&東西。
這是XML文件片段:
<?xml version="1.0" encoding="utf-8"?>
<xmlData date="29.04.2010 12:09:13">
<Table>
<ident>079186</ident>
<stock>0</stock>
<pricewotax>33.94000000</pricewotax>
<discountpercent>0.00000000</discountpercent>
</Table>
<Table>
<ident>079190</ident>
<stock>1</stock>
<pricewotax>10.50000000</pricewotax>
<discountpercent>0.00000000</discountpercent>
<pricebyquantity>
<Table>
<quantity>5</quantity>
<pricewotax>10.00000000</pricewotax>
<discountpercent>0.00000000</discountpercent>
</Table>
<Table>
<quantity>8</quantity>
<pricewotax>9.00000000</pricewotax>
<discountpercent>0.00000000</discountpercent>
</Table>
</pricebyquantity>
</Table>
</xmlData>
http://en.wikipedia.org/wiki/ERP => ERP? – lexu 2010-04-26 12:47:46