JAVA XML, find recursively
===

I need to find recursively xml Node by id in something like this:

 

    <categories>
      <category id="1">
      </category>
      <category id="2">
           <category id="3"> 
           </category>
           <category id="4"> 
                  <category id="5"> 
                  </category> 
           </category>
      </category>
    </categories>

I'm using DocBuilder.

I know that there is method "getElementById", but it doesn't work in my situation, where' let's say, that i want to find element with id="5", when i am in root node.

Is it possible ?