Tuesday, August 6, 2013

Efficient way to search for an element name in DOM4j document

Efficient way to search for an element name in DOM4j document

What is the most efficient to search an element?
Would it take to traverse through the complete DOM4j document?
Should I use XPATH here?
I am actually comparing two XML documents. Will iterate through first xml
one by one and search for it the second xml document.
It is not a straightforward comparison. I would be comparing name
attribute value with second xml's elements. And if first xml has any name
such as name="xx.yy" then I need to look for <xx> <yy></yy> </xx> in
second xml.

No comments:

Post a Comment