Hi all,
I'm pulling this out of the depths of the dom4j user list...  Edwin 
Dankert replied to this commenting that the id() function was not 
implemented.  I'm curious as to why the dom4j function elementByID does 
not work.  It seems like this should be independent of Jaxen.  I've been 
using the xpath traversal, but I have some slowness that I'm looking for 
a possible solution to.
Thanks,
--Evan

Evan Kirkconnell wrote:
> Hello all,
> Another issue I've run into is an inability to select by id.  I have 
> the following code, and the only one that works is the 2nd one which 
> is iterative.  I'm thinking the other two use an actual index.
>    public Node getById(String id){
>        //return root.selectSingleNode("id('"+id+"')");
>        return root.selectSingleNode("/descendant::[EMAIL 
> PROTECTED]'"+id+"']");
>        //return root.elementByID(id);
>    }
>
> Attached is my xml file, which validates as an XHTML document.  It's 
> my understanding that the XHTML doctype defines "id" to be the unique 
> identifier.
> Thanks for any help,
> --Evan



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to