I never liked XML, and always tried to avoid it. And the day finally has come.
When I tried to parse XML it was really hard. I used DOM parser, when I called getChildNodes()
of a Node
, it returned NodeList
. I had to use casting while using XPath.
Is there any Java XML parsing library that is similar to WebDriver's WebElement mechanism, where getChildNodes()
returns List<Node>
(or Collection, Iterable etc.), I don't need to do casting.In other words, is there a XML parser library that is elegant and simple.
The library can be read only, I don't need manipulation.