A
Anna
Hi all. I have a rather odd question:
I need to construct an XPath, where one of the conditions is not() on
other XPath. SOmething like this:
//img[not(//img[@alt])] - image that is not image with alt attribute.
Of course, in this case I could just say //img[not(@alt)], but my
XPaths are
generated automatically, so I have to have it in the form of
XPath1[not(XPath2)].
//*[not(self::*=//img)], for example, will choose all the nodes that
are not img nodes.
But if I try for the above case to say :
//img[not(self::*=//img[@alt])]
it doesn't work. So is there a way to do such a thing?
Thank you very much for help.
Anna
I need to construct an XPath, where one of the conditions is not() on
other XPath. SOmething like this:
//img[not(//img[@alt])] - image that is not image with alt attribute.
Of course, in this case I could just say //img[not(@alt)], but my
XPaths are
generated automatically, so I have to have it in the form of
XPath1[not(XPath2)].
//*[not(self::*=//img)], for example, will choose all the nodes that
are not img nodes.
But if I try for the above case to say :
//img[not(self::*=//img[@alt])]
it doesn't work. So is there a way to do such a thing?
Thank you very much for help.
Anna