でのSalesforceの複数の名前空間を提供するためにどのように私はこれを下回る私はセールスフォースからもらったようなレスポンスを持っています。私はxpathを使用してProfileIdを取得する必要があります。XPathの
<queryResponse xmlns="urn:partner.soap.sforce.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:sobject.partner.soap.sforce.com">
<result xsi:type="QueryResult">
<done>true</done>
<queryLocator xsi:nil="true"/>
<records xsi:type="sf:sObject">
<sf:type>User</sf:type>
<sf:Id xsi:nil="true"/>
<sf:Username>[email protected]</sf:Username>
<sf:ProfileId>00e90000001aVwiAAE</sf:ProfileId>
<sf:Name>user</sf:Name>
<sf:LastName>test</sf:LastName>
<sf:Email>[email protected]</sf:Email>
</records>
<size>1</size>
</result>
</queryResponse>
私はオンラインのxpathジェネレータを使用しました。それは私に以下のxpathを与えました。しかし、それは間違っているようです。
/queryResponse[@xmlns="urn:partner.soap.sforce.com"]/result[@xsi:type="QueryResult"]/records[@xsi:type="sf:sObject"]/sf:ProfileId/text()
'/ queryResponse/result/records/sf:ProfileId/text()'または '/queryResponse[namespace-uri()/select:partner.soap.sforce.com"]/result[@xsi:type = "QueryResultでは"] /レコードの[@xsi:タイプ= "SF:のsObject"]/SF:プロファイルID /テキスト() ' – Andersson
@UshaniはどのようにしてそのXPathを実行したのですか?ここでXPathプロセッサとは何ですか? – har07
@ har07 http://xmltoolbox.appspot.com/xpath_generator.htmlを使用しました。 。私はxpathに名前空間自体を提供する方法を知る必要がありますか? – Ushani