0
我試圖爲ID爲tblXDAP-txtfXdapType - 1的單個「表單」選擇元素「值」的子文本。xPath幫助 - 選擇同胞
這裏是我的XML
<form xsi:type="ns1:FormElement">
<ID xsi:type="soapenc:string">tblXDAP-txtfXdapType--1</ID>
<label xsi:type="soapenc:string">XDAP Type</label>
<labelValue xsi:nil="true" xsi:type="soapenc:string"/>
<type xsi:type="xsd:int">0</type>
<value xsi:type="soapenc:string">Win7 x64 Developer</value>
</form>
<form xsi:type="ns1:FormElement">
<ID xsi:type="soapenc:string">tblXDAP-txtfXdapUser--1</ID>
<label xsi:type="soapenc:string">User</label>
<labelValue xsi:nil="true" xsi:type="soapenc:string"/>
<type xsi:type="xsd:int">0</type>
<value xsi:type="soapenc:string"/>
</form>
<form xsi:type="ns1:FormElement">
<ID xsi:type="soapenc:string">tblXDAP-txtfXdapType--2</ID>
<label xsi:type="soapenc:string">XDAP Type</label>
<labelValue xsi:nil="true" xsi:type="soapenc:string"/>
<type xsi:type="xsd:int">0</type>
<value xsi:type="soapenc:string">Win7 x86 Standard</value>
</form>
我使用XPath //*[local-name()='form'][*[local-name()='ID'][starts-with(., 'tblXDAP-txtfXdapType--1')]]
的樣本,但我無法選擇該查詢的值。在我的例子,我想選擇值「X64 Win7的開發」