Add xml writing capabilities to XMLParser.java