Improved Code design in xml parsers a bit