Probably all about the same, under the covers.
Though, the '//' notation is woefully inefficient, simply
because it has to search the entire depth of the document
looking for a <foo> followed by a <bar>.
When possible, try to avoid the // notation, regardless of
the method or XPath engine you're using.
-bob
On Wed, 6 Feb 2002, Frank Walinsky wrote:
> Can anyone supply the pros/cons on which of the following code snippets is
> better to use?
>
> List list = document.selectNodes( "//foo/bar" );
>
> or
>
> XPath xpathSelector = DocumentHelper.createXPath( "//foo/bar" );
> List results = xpathSelector.selectNodes(document);
>
> Thanks,
> Frank
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user