Reduced parse_xml code in parse_test
Reduced parse_xml code in parse_test