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

XML DOM baseURI Property

XML DOM baseURI Property


Node Object Reference Node object


Definition and Usage

The baseURI property returns the absolute base URI of a node.

Syntax

nodeObject.baseURI


Example

The following code snippet uses loadXMLDoc() to load "books_ns.xml" Load into xmlDoc, and return the Get the element's base URI:</p>

Example

xmlDoc

=

loadXMLDoc

(

"

books_ns.xml

"

)

;

x

=

xmlDoc

.

getElementsByTagName

(

'

title

'

)

;

for

(

i

=

0

;

i

<

x

.

length

;

i

++

)

{

document

.

write

(

x

.

item

(

i

)

.

baseURI

)

;

document

.

write

(

"

"

)

;

}

Try it »


Node Object Reference Node object