Added new features to the XMLTool, Fixed Java 7 Compatibility issues

The code for the XML tool needs refactoring and commenting.