+ -
当前位置:首页 → 问答吧 → 如何解析这段xml ,非常感谢

如何解析这段xml ,非常感谢

时间:2011-01-05

来源:互联网

<?xml version='1.0' encoding='GBK'?>
<th>
  <StockInCode>CN201011050002</StockInCode>
  <ExternalOrderCode>201011050002</ExternalOrderCode>
  <WarehouseCode>beijingzongcang001</WarehouseCode>
  <PurchaseOrderCode>041-39848751</PurchaseOrderCode>
  <CreateDate>2010/11/05 18:30:38</CreateDate>
  <AcpThDate>2010/11/05 22:25:10</AcpThDate>
  <AcpDate>2010/11/06 8:20:10</AcpDate>
  <CreatorName>李光华</CreatorName>
  <Remark>s</Remark>
  <thItems>
  <LineId>1</LineId>
  <ProductCode>Mst0293</ProductCode>
  <Quantity>3</Quantity>
  <SpecialDes>3</SpecialDes>
  <Remark>1</Remark>  
  <thItemsBarcode>
<barcode>111</barcode>
<barcodeFlag>0</barcodeFlag>
  </thItemsBarcode>
  </thItems>

  <thItems>
  <LineId>2</LineId>
  <ProductCode>Mst0293</ProductCode>
  <Quantity>3</Quantity>
  <SpecialDes>3</SpecialDes>
  <Remark>1</Remark>
<thItemsBarcode>
<barcode>111</barcode>
<barcodeFlag>0</barcodeFlag>
</thItemsBarcode>
  </thItems>

  <thItems>
  <LineId>3</LineId>
  <ProductCode>Mst0293</ProductCode>
  <Quantity>3</Quantity>
  <SpecialDes>3</SpecialDes>
  <Remark>1</Remark>
<thItemsBarcode>
<barcode>222</barcode>
<barcodeFlag>0</barcodeFlag>
</thItemsBarcode>
  </thItems>

</th>

作者: jsp_chengli   发布时间: 2011-01-05

使用dom4j进行解析

作者: dyllove98   发布时间: 2011-01-05

js可以完成解析的

作者: IBM_hoojo   发布时间: 2011-01-05