DOM implementation and wrapper for XmlDoc