DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
XML GetChildNode Via NodeName
/********************************************************
Function: getChildNodeName
note:
Cycle through the child nodes and find the first instance of the name.
*********************************************************/
XMLNode.prototype.getChildNodeName = function(nName) {
for (var i=0; i<this.childNodes.length; i++) {
var tChild = this.childNodes[i];
if (tChild.nodeName === nName) {
return tChild;
}
}
return null;
};





