You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Daria Spescha (JIRA)" <ji...@apache.org> on 2018/10/04 17:30:00 UTC
[jira] [Created] (JXPATH-194) Support for JDOM 2
Daria Spescha created JXPATH-194:
------------------------------------
Summary: Support for JDOM 2
Key: JXPATH-194
URL: https://issues.apache.org/jira/browse/JXPATH-194
Project: Commons JXPath
Issue Type: Bug
Affects Versions: 1.3
Environment: * Java 8 (Windows)
* jdom2
Reporter: Daria Spescha
JXPath does not correctly recognize JDOM 2 documents (since namespace changed to org.jdom*2*) and treats them as "normal" Java objects which results in an infinite loop on evaluating XPath expression.
My workaround was copying all classes from package org.apache.commons.jxpath.ri.model.jdom to a new package and replacing all occurences of "org.jdom" by "org.jdom2" (and renaming classes accordingly). Additionally, I added the copied Pointer Factory to the context:
{code:java}
JXPathContextReferenceImpl.addNodePointerFactory(new JDOM2PointerFactory());
{code}
XPath evaluation now works again as expected.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)