Let's say I have the below XML
<root>
<element class="Page" style="background: url(/images/RlEguQY3_ghsdr.png?1324483033) repeat left top;" />
<element class="User" />
<element class="Image" src="/images/bg.png" />
</root>
I am looking for a xpath expression which 1) matches all elements that have /images in the style attribute and 2) matches all Image elements that have /images in the src attribute
Any help greatly appreciated
Thanks
//element[contains(@style, '/images') or (@class='Image' and contains(@src, '/images'))]
(or something similar) should do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With