Shitty implementation of an xml parser.