Hi, this is for school, if you know your XPath and wouldn't mind telling me if I'm correct:
1.
//a[/b]/a
every 'a' that has a parent 'a' in a tree where the root is 'b'. (the location of the [/b]
is irrelevant? i.e. is the above equivalent to //a/a[/b]
?
2.
//*[//a]//a[/a][a]
breaking it down from left to right:
//*[//a]
means all elements having a descendant 'a',
therefore //*[//a]//a
(quite school-excerisely) means all 'a' elements.
and //*[//a]//a[/a]
means all 'a' elements in a tree where the root is 'a',
and finally - //*[//a]//a[/a][a]
means all 'a' elements in a tree where the root is 'a' that have a child 'a'.
Thanks for any help, can't seem to get a straight answer anywhere.