Add abstract XML parser and refactor parsers