我有一个从 MSMQ 中提取的 eConnect 传出文档,我需要遍历行项目。我试过了:
XmlNodeList nodes = root.SelectNodes("/Sales_History_Transaction/eConnect/SO_Hist_Trans/Line");
(以及其他几次尝试)没有成功......
这是 XML,我如何从“行”节点获取行项目的集合,以便我可以获取行项目详细信息?
<Sales_History_Transaction:root>
<eConnect ACTION="1" Requester_DOCTYPE="Sales_History_Transaction" DBNAME="TWO" TABLENAME="SOP30200" DATE1="2013-05-03T09:24:09.970" SOPNUMBE="999999" SOPTYPE="3">
<SO_Hist_Trans>
<SOPNUMBE>999999</SOPNUMBE>
<SOPTYPE>3</SOPTYPE>
<Line>
<CMPNTSEQ>0</CMPNTSEQ>
<LNITMSEQ>998777</LNITMSEQ>
<ITEMNMBR>0099999</ITEMNMBR>
<ITEMDESC>Laptop</ITEMDESC>
</Line>
<Line>
<CMPNTSEQ>0</CMPNTSEQ>
<LNITMSEQ>777</LNITMSEQ>
<ITEMNMBR>0099</ITEMNMBR>
<ITEMDESC>Desktop</ITEMDESC>
</Line>
<Line>
<CMPNTSEQ>0</CMPNTSEQ>
<LNITMSEQ>679777</LNITMSEQ>
<ITEMNMBR>0569</ITEMNMBR>
<ITEMDESC>Memory</ITEMDESC>
</Line>
</SO_Hist_Trans>
</eConnect>
</Sales_History_Transaction:root>