 <p>The cleaneast way would be to unmarshall the XML using Jaxb or something like Xstream : you create a Java object that represent your XML and then Jaxb will create an object and populate it with the XML values. An example for your XML would be :</p> <pre><code>public class Item { private String itemNo; private String name; private String value; private String config; ... GETTERS / SETTERS } </code></pre>