ItemID の入力を受け入れ、対応するアイテム番号を返す、Oracle によって公開された WebService を呼び出しています。応答に含まれる XML から返されたアイテム番号を取得したいと考えています。
XML は次のようになります。
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns0="http://dev1/MyWebService1.wsdl">
<env:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
env:mustUnderstand="1"/>
</env:Header>
<env:Body>
<ns0:getItemNbrByItemIdResponseElement>
<ns0:result>1010603</ns0:result>
</ns0:getItemNbrByItemIdResponseElement>
</env:Body>
</env:Envelope>
<ns0:result>1010603</ns0:result>
特に 1010603 のみを取得することに興味があります。
私は C# を使用して XML を解析する作業をあまり行っていません。これまでのところ、いくつかの異なる方法で遊んでいます。これを行うための推奨される方法は何ですか?
私はVS2008を使用しています(XPathが利用可能など)