Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery.isXMLDoc() method

jQuery.isXMLDoc() method

jQuery Miscellaneous MethodsjQuery Miscellaneous Methods

Example

Determine whether an object is in an XML document

$

(

function

(

)

{

function

fun

(

html

)

{

document

.

body

.

innerHTML

+=

"


"

html

;

}

fun

(

$.

isXMLDoc

(

document

)

)

;

//

false

fun

(

$.

isXMLDoc

(

document

.

body

)

)

;

//

false

}

)

Try it »


Definition and Usage

The $.isXMLDoc() function is used to determine whether a DOM node is within an XML document, or is itself an XML document.


Syntax

$

.isXMLDoc( node )

Parameters Description
node Element type: The DOM node to be checked.

jQuery Miscellaneous MethodsjQuery Miscellaneous Methods