XML DOM isSameNode() Method
Complete Element Object Reference
Definition and Usage
The isSameNode() method checks if the specified node is the same as the
existing node.
This function returns TRUE if the two nodes are the same, and FALSE
otherwise.
Syntax
|
elementNode.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:
Example
xmlDoc=loadXMLDoc("books.xml");
x=xmlDoc.getElementsByTagName("book")[0];
y=xmlDoc.getElementsByTagName("book")[1];
document.write(x.isSameNode(y));
|
Output:
Try it yourself »
|
Complete Element Object Reference

Whether you're new to XML or already an advanced user,
the user-friendly views and powerful entry helpers,
wizards, and debuggers in XMLSpy are designed to meet your XML
and Web development needs from start to finish.
New features in Version 2010!
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- XBRL validator, taxonomy editor, taxonomy wizard
- Support for Office Open XML (OOXML)
- Graphical WSDL 1.1/2.0 editor & SOAP debugger
- JSON editing & conversion
- Java, C#, C++ code generation
- And much more!
Download a free trial today!
|
|
|
|