的Xml struture如何刪除屬性的XML
<soap-env:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<mm7:id xmlns:mm7="http://schemas.xmlsoap.org/soap/envelope/" mustUnderstand="1">1234</mm7:id>
</soapenv:Header>
<soap-env:Body>
<SubmitReq>
<number xmlns="">5674</number>
</SubmitReq>
</soap-env:Body>
</soapenv:Envelope>
編碼
Dim bodychild As XmlElement = _xmlRequest.CreateElement("SubmitReq", "http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2")
soapBody.AppendChild(bodychild)
Dim numberAs XmlElement = _xmlRequest.CreateElement("number")
number.InnerText = "5674"
bodychild.AppendChild(number)
如何刪除的xmlns = 「」,我嘗試使用和的removeAttribute方法RemoveAttributeAt刪除,但沒有。是不是可以刪除它?
我試試這個編碼number.Attributes.RemoveNamedItem(「xmlns」)同樣無法刪除它 – askingPPl