Add XmlDocument and tests