I need to Fetch the value of data from XML having multiple same elements :-
<Phones>
<ContactPhone>
<number>Example string value.</number>
<useType readonly="true">Home</useType>
</ContactPhone>
<ContactPhone>
<number>Example string value.</number>
<useType readonly="true">Work</useType>
</ContactPhone>
<ContactPhone>
<number>Example string value.</number>
<useType readonly="true">Pager</useType>
</ContactPhone>
<ContactPhone>
<number>Example string value.</number>
<useType readonly="true">Mobile</useType>
</ContactPhone>
<ContactPhone>
<number>Example string value.</number>
<useType readonly="true">Fax</useType>
</ContactPhone>
If UseType is Home the the Number in that ContactPhone is Extracted, else if UseType is Work the that Number should be extracted. How can i achive this , also the data is to fetched from API, SO there might be possibility the complete tags /phone number might not appear.
hi all,
as far as I know, tExtractXMLField use dom4j parser.
by that way you're able to use some filter in yout Xpath expression but could become 'touchy'.