I am writing an internal GWT-Hibernate web application for our development team.
I used to write tools for parsing XML files that represented the client configuration compiled in a parsing field. Now I'm trying to add an interface to the support group. XML parsing uses the xpath and org.w3c.dom classes to use the configuration files after combining the user interface and parsing code into the same project that I ran into a dependency problem. Hibernate 3.5.1 depends on dom4j, which uses the old version of xml-apis. The jml-apis jar has old versions of the org.w3c.dom classes, so the old one of the methods that I use in parsing XML is not available.
The org.w3c.dom.Node.getTextContext method, which is not available in older xml-apis classes.
Node node = (Node)xpath.evaluate("//probe/configfile[@group=\"daemon.ini\"]/content", data, XPathConstants.NODE); if(node != null) { String content = node.getTextContent();
The maven: tree dependency shows the problem, hibernate, dom4j, xml-apis 1.0.b2.
[INFO] + - org.hibernate: hibernate-core: jar: 3.5.1-Final: compile
[INFO] | + - antlr: antlr: jar: 2.7.6: compile
[INFO] | + - dom4j: dom4j: jar: 1.6.1: compile
[INFO] | | \ - xml-apis: xml-apis: jar: 1.0.b2: compile
Suggestions on the best way to solve this problem?
- Maven dependency configuration? I am new to maven, so explicitly.
- Parsing XML with another API?
Thanks in advance.
source share