1
我必須構建具有SOAP信封,像這樣的XML文檔的SOAP信封:構建使用LINQ to XML
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
認爲SOAP-ENV也是一個的XElement,所以嘗試這樣的:
XNamespace soap = "http://schemas.xmlsoap.org/soap/envelope/";
XElement soapEnvelope = new XElement(soap + "SOAP-ENV:Envelope",
new XAttribute(XNamespace.Xmlns + "xmlns:SOAP-ENV", soap.NamespaceName),
new XElement("SOAP-ENV:Body"));
給出了這樣的錯誤:
The ':' character, hexadecimal value 0x3A, cannot be included in a name.
任何線索?
在此先感謝。
感謝您的時間和回答 – Codehelp 2014-10-28 08:15:04
歡迎您。 – kennyzx 2014-10-28 08:15:38