I'm writing a GWT-Hibernate internal web application for our development group.
Previously, I had written tools to parse up XML files which represented customer configuration gathered in the field for analysis. Now, I'm trying to add an UI front-end for the support group. The XML parsing code uses xpath and org.w3c.dom classes to consume the config files, after merging the UI and parsing code into the same project I've run into a dependency issue. Hibernate 3.5.1 depends on dom4j which uses a old version of xml-apis. The xml-apis jar has old versions of the org.w3c.dom classes, so old that one of the methods I'm using in the XML parsing isn't available.
The method org.w3c.dom.Node.getTextContext which is not available in the old xml-apis classes.
Node node = (Node)xpath.evaluate("//probe/configfile[@group=\"daemon.ini\"]/content", data, XPathConstants.NODE);
if(node != null) {
String content = node.getTextContent();
// Do more work...
The maven dependency:tree shows the issue, 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 issue?
- Maven dependency configuration? I'm new to maven, so be explicit.
- Parse the XML using a different API?
Thanks in advance.