4
私はこのようなXML/SOAPファイルを持っている:LINQのXMLに - 単一の要素を抽出し
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SendData xmlns="http://stuff.com/stuff">
<SendDataResult>True</SendDataResult>
</SendData>
</soap:Body>
</soap:Envelope>
私はSendDataResult値を抽出したいけど難し次のコードや他の様々な方法でそうすることを持っていますが私はもう試した。要素に値があっても常にnullを返します。
XElement responseXml = XElement.Load(responseOutputFile);
string data = responseXml.Element("SendDataResult").Value;
SendDataResult要素を抽出するために必要なこと。