docs: public static org.w3c.dom.Node toDomNode(Object xmlObject) {
          //    Could return DocumentFragment for XMLList
          //    Probably a single node for XMLList with one element
          if (xmlObject instanceof XML) {
              return ((XML)xmlObject).toDomNode();
          } else {
              throw new IllegalArgumentException(
                      "xmlObject is not an XML object in JavaScript.");
          }
      }