code: function( elem ) {
  		return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
  			!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
  	}
docs: check if an element is in a (or is an) XML document