我正在通过本地文件读取 xml 命名空间。当我输出时,我得到
"

在命名空间中。我究竟做错了什么?
示例命名空间看起来像
xmlns:dacc="urn:rosettanet:specification:domain:Procurement:AccountClassification:xsd:codelist:01.03"
我正在加载命名空间,如下所示:
string contents = File.ReadAllText("loadNamespaces.txt");
XmlNode ShipmentReceiptNotification0Node = xmlDoc.CreateElement("ShipmentReceiptNotification", contents);
最佳答案
在 CreateElement
方法,第二个参数只是命名空间。只是“urn:rosettanet:specification:interchange:ShipmentReceiptNotification:xsd:schema:02.02
”部分。
关于c# - 命名空间未正确加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15286917/