docs: function xmlImportNode(doc, node) {
    if (node.nodeType == DOM_TEXT_NODE) {
      return domCreateTextNode(doc, node.nodeValue);
  
    } else if (node.nodeType == DOM_CDATA_SECTION_NODE) {
      return domCreateCDATASection(doc, node.nodeValue);
  
    } else if (node.nodeType == DOM_ELEMENT_NODE) {
      var newNode = domCreateElement(doc, node.nodeName);
      for (var i = 0; i < node.attributes.length; ++i) {
        var an = node.attributes[i];
        var name = an.nodeName;
        var value = an.nodeValue;
        domSetAttribute(newNode, name, value);
      }
  
      for (var c = node.firstChild; c; c = c.nextSibling) {
        var cn = arguments.callee(doc, c);
        domAppendChild(newNode, cn);
      }
  
      return newNode;
  
    } else {
      return domCreateComment(doc, node.nodeName);
    }
  }