Fixed some little bugs in the XMLTool. Added more example code.