title: Specify XML path in dom4j
body: <p>I want to parse a large xml file using dom4j. I'm using the dom4j's feature that you can register event handlers for path expressions for ignoring the elements I don't care about. The feature is explained here: <a href="http://dom4j.sourceforge.net/dom4j-1.6.1/faq.html#large-doc" rel="nofollow">http://dom4j.sourceforge.net/dom4j-1.6.1/faq.html#large-doc</a>. </p>
  
  <p>I quote from there:
  "These handlers will then be called on the start and end of each path registered against a particular handler. When the start tag of a path is found, the onStart method of the handler registered to the path is called. When the end tag of a path if found, the onEnd method of the handler registered to that path is called.</p>
  
  <p>The onStart and onEnd methods are passed an instance of an ElementPath, which can be used to retrieve the current Element for the given path. If the handler wishes to "prune" the tree being built in order to save memory use, it can simply call the detach() method of the current Element being processed in the handlers onEnd() method."  </p>
  
  <p>My problem is that I don't know what path should I give so that all the children of the root node to be handled by the 2 methods.</p>
  
  <p>My xml file is something like:</p>
  
  <pre><code>&lt;root .....&gt;
    &lt;chef name="" ..../&gt;
    &lt;chef name="" ..../&gt;
    &lt;recipe name = .... /&gt;
    &lt;recipe name...../&gt;
    ....
  </code></pre>
  
  <p></p>
  
  <p>If I would like to handle chef elements than the path would be /root/chef.
  For recipe elements the path would be /root/recipe.</p>
  
  <p>But what is the path that should be given to the dom4j so that it will handle (in the onStart(), onEnd()) both chef and recipe elements?</p>
  
  <p>Thanks a lot!  </p>