Added contracts for XmlParser.