Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JXPath and Dom -- How to get getPointerByID to work.

843834Jan 14 2003 — edited Feb 16 2003
Hi, I always get this exception,
org.apache.commons.jxpath.JXPathException: Cannot find an element by ID - no IdentityManager has been specified
when i try (or similar)
JXPathContext  context = JXPathContext.newContext( doc );
context.getPointerByID("1");
where doc is a org.w3c.dom.Document.

The api of JXPath says that i have to set an IdentityManager, but the Api of the IdentityManager says:


A delegate of JXPathContext that implements the XPath "id()" function. This delegate is only used when there is no default implementation of the id() function. For example, it is not used when the root of the context is a DOM Node.


So what do I have to do to enable this default function??

Thanks a lot in advance.

Greetings Michael
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2003
Added on Jan 14 2003
6 comments
201 views