Refactor XmlDriver