Home | Top | Web development | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.


nextNode Method

Returns the next node in the collection.

var objXMLDOMNode = oXMLDOMNamedNodeMap.nextNode();

Return Value

An IXMLDOMNode , which refers to the next node in the collection. Returns Null if there is no next node.

Example

The following script example creates an IXMLDOMNamedNodeMap object and uses its nextNode method to iterate the collection.

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0"); var objNamedNodeMap; var objNode; xmlDoc.async = false; xmlDoc.resolveExternals = false; xmlDoc.load("books.xml"); if (xmlDoc.parseError.errorCode <> 0) {    var myErr = xmlDoc.parseError;    alert("You have error " + myErr.reason); } else {    objNamedNodeMap = xmlDoc.documentElement.childNodes(1).attributes;    for (var i=0; i<objNamedNodeMap.length; i++) {       objNode = objNamedNodeMap.nextNode();       alert(objNode.text);    } }
Home | Top | Web development | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.