I have been working on Java with XML since 2002. It used to be quite confusing and complex to get the value of a tag for example as it required to get into Node
level. Here’s an example:
[xml]
<books>
<book>
<title>Book1</title>
<prod id="33-657" media="paper"></prod>
<chapter name="Introduction to XML">
<para>What is HTML</para>
<para>What is XML</para>
</chapter>
<chapter name="XML Syntax">
<para>Elements must have a closing tag</para>
<para>Elements must be properly nested</para>
</chapter>
</book>
<book>
<title>Book2</title>
…
…
</book>
</books>
[/xml]
From functional point of view, I may be interested to get book names. So instead of going into familiar low-level Element
and Node
route, here’s what I prefer:
[Read more…] about xml-utilities : High Level XML Java Utility APIs