On Wed, Jan 26, 2005 at 11:07:11AM +0000, Edwin Dankert wrote:
> Your first xpath '/*/person' returns all person elements.
> 
> Note: Starting an XPath expression with '/' will disregard the current
> context and will start evaluating the expression from the root
> element.
This is going to solve all my probs.

BTW I find the dom4j notion of context a bit confusing. Usually one refers
to "context" when he means that there is nothing outside it, so the root
of the context becomes the only root visible.

> So your second xpath '/*/name/text()' would have returned a value if
> your document had the following structure:
> 
> <db>
>   <name>Jack</name>
>   <name>Barbara</name>
> </db>
I was thinking that the function was evaluated on
  <person>
    <name>Jack</name>
    <age>23</age>
  </person>

I was wrong :)

What about examples and counter examples in XPath documentation?

-- 
Gioele Barabucci <[EMAIL PROTECTED]>
) http://cs.unibo.it/~barabucc


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to