solving an edge case for parsing an xml