> Firstly, how do you do an xpath search on just an
> element?
>
> <People>
> <Person id="282">
> <FirstName>Jenny<FirstName/>
> <LastName>Ynnej<LastName/>
> <Age>1009<Age/>
> <PhoneNumber>777 777 7777</PhoneNumber>
> </Person>
> <Person id="289">
> ...
> ...
> </People>
If you want to search relative to the <Person> Element, just leave out the
initial "/" (which means start with the document) and do something like:
personElement.selectNodes("FirstName")
Leaving out the initial slash makes the search relative to the element you
invoke selectNodes on.
-- Steen
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user