Simplified code for XML parser.