1
我有下面的XML,我希望能夠去哪裏類型值= 1XPath表達式得到一個值基於其它值
我曾嘗試很多不同的場景的電話值並得到以下; //Telephone/type[text()='1']/parent::tel
但這是行不通的。請有人幫忙。
<Telephone>
<Number>
<tel>01242123456</tel>
<CountryCode>GB</CountryCode>
<CountryDiallingCode>+44</CountryDiallingCode>
</Number>
<type>1</type>
</Telephone>
<Telephone>
<Number>
<tel>07777777777</tel>
<CountryCode>GB</CountryCode>
<CountryDiallingCode>+44</CountryDiallingCode>
</Number>
<type>3</type>
</Telephone>
完美!非常感謝。 :) – TestingHut