does anyone know of a good library or method of converting the contents of a HashMap to XML and then parsing this to reconstruct the HashMap?
The XStream library is what you want. http://x-stream.github.io/
It has a HashMap converter, and a tutorial on how to use convertors.
Java Architecture for XML Binding (JAXB) allows Java you to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and tunmarshal XML back into Java object
Where to start? Pick a tutorial from these:
http://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding
http://jaxb.java.net/
http://java.sun.com/developer/technicalArticles/WebServices/jaxb/
In 15 minutes your done!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With