Renamed parse_xml to parse_str and updated the implementation of parse_file.