  XmlDocWrapper(xmlDocPtr doc, const String& cls, Object domNode = nullptr)
    : m_doc(doc), m_cls(cls), m_domNode(domNode) {
    if (!domNode.isNull()) {
      DEBUG_ONLY c_DOMNode *domnode = domNode.getTyped<c_DOMNode>();
      assert(!domnode || domnode->m_node == (xmlNodePtr) doc);
    }
  }
  XmlDocWrapper(xmlDocPtr doc, const String& cls, Object domNode = nullptr)
    : m_doc(doc), m_cls(cls), m_domNode(domNode) {
    if (!domNode.isNull()) {
      DEBUG_ONLY c_DOMNode *domnode = domNode.getTyped<c_DOMNode>();
      assert(!domnode || domnode->m_node == (xmlNodePtr) doc);
    }
  }