0
我做錯了什麼不能搶shipmentreceiptlineitem添加到第一個文檔,我需要添加一個命名空間嗎?xdocument添加xdocument
XDocument xdoc = XDocument.Load("FirstPart.xml");
xdoc.Root.Add(XDocument.Load("RepeatingPart.xml").Element("ShipmentReceiptLineItem").Elements());
XML搶來源:
<tns:ShipmentReceiptNotification xmlns:dl="urn:rosettanet:specification:domain:Logistics:xsd:schema:02.18"
xmlns:tns="urn:rosettanet:specification:interchange:ShipmentReceiptNotification:xsd:schema:02.01">
<tns:ShipmentReceiptLineItem>
</tns:ShipmentReceiptLineItem>
</tns:ShipmentReceiptNotification>
您正在加載兩個文檔,但您只顯示其中一個 - 而且您沒有說明結果與您希望的結果進行比較的結果。 – 2013-03-15 21:00:49