hi i need help to extract information from XML with xpath.
I will use Xpath to extract the value of the attribute of one Tag that start with a generic keywork:
<st:Testprova id='abcd'>
....
</st>
or
<st:Test1prova id='defg'>
....
</st>
I used that Xpath expression:
"//*[contains(.,'prova')]/@ID"
but does not work. Can you help me??
You are using
@IDinstead of@id, this is case sensitive. Besides, you should usename()to retrieve the node-name.This XPath expression
returns
abcdanddefgAlthough your XML is not correct, it should be: