Newbie XPath attribute value question

N

Nik

Hello,

I have XML-documents which are quite attribute-heavy and would like
to search all attribute values for match with a certain string, no
matter in what element or attribute they are found. What would the
syntax be?

Thanks in advance,
-Nik
 
B

Bjoern Hoehrmann

* Nik wrote in comp.text.xml:
I have XML-documents which are quite attribute-heavy and would like
to search all attribute values for match with a certain string, no
matter in what element or attribute they are found. What would the
syntax be?

//@*[. = 'text-you-are-looking-for']

Or instead of using = e.g. contains(...) depending on what you are
looking for.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top