Lists Home |
Date Index |
> Return all the "b" nodes that are inmediately preceded by an "a"
> element (the bold nodes).
preceding-sibling::* gets you the immediately preceding element;
the [self::a] predicate tests whether the element that you select is
an 'a' element or not.
It's better doing it this way than using local-name() because it deals
properly with namespaces (i.e. it looks for 'a' elements in no
namespace rather than all elements that are called 'a' no matter what
namespace they're in).
- Quick Xpath
- From: "Garland foster" <firstname.lastname@example.org>