Split XML parser code