title: Using Xpath in Dom4j
body: <p>I get the following exception when trying to access any nodes of a parsed xml document on dom4j: </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/JaxenException
  at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
  at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
  at org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:164)
  at xmlparser.LevelsExtractor.findI(LevelsExtractor.java:73)
  at xmlparser.Main.main(Main.java:33)
  </code></pre>
  
  <p>I know that the parsing works, because I can have the parser print out the xml document or save it to file.  Here is the code I'm using.</p>
  
  <p>To parse the document:</p>
  
  <pre><code> public class Parser {
  
   public Document parseWithSAX(File aFile) throws DocumentException {
      SAXReader xmlReader = new SAXReader();
      Document doc = xmlReader.read(aFile);
      return doc;
    }
  </code></pre>
  
  <p>To try to get a node I've tried the following lines, all of which produce the same error:</p>
  
  <pre><code>      List list = doc.selectNodes("");
        QName qn = new QName("////Token/text()='Introduction'");
        Element el = doc.selectSingleNode("////Token/text()='Introduction'");
        Node node = doc.selectSingleNode( "/DOCUMENT/PAGE/TEXT/TOKEN/text()= 'Introduction'");
  </code></pre>
  
  <p>This will print out the xml doc which I assume means that doc (which is the parsed xml doc) contains what it should.  </p>
  
  <pre><code>      System.out.println(doc.asXML());
  </code></pre>
  
  <p>I really appreciate your help!</p>