w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
BEST WEB HOSTING JustHosts

XML DOM isSameNode() Method


Node Object Reference Complete Node Object Reference

Definition and Usage

The isSameNode() method returns true if a node is the same node as the given one, otherwise it returns false.

Syntax

nodeObject.isSameNode(node)

Parameter Description
node Required. The node to check


Example

The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and checks if two nodes are the same node:

Example

xmlDoc=loadXMLDoc("books.xml");

x=xmlDoc.getElementsByTagName("book")[0];
y=xmlDoc.getElementsByTagName("book")[1];

document.write(x.isSameNode(y));

Output:

false

Try it yourself »

Node Object Reference Complete Node Object Reference

Free Online Website Builder - No Downloading Needed

Create a free Flash website with our simple, online web design editing platform. Stunning templates and user-friendly tools make website building easy and fun.

Start Creating your free website now!


WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap UK Web Hosting
WEB BUILDING
XML Editor – Free Trial!
FREE Flash Website
FREE Web Templates
SEO Company
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE