I have an xml document that i have loaded into ie
var xmlDoc = new ActiveXObject("msxml2.DOMDocument.3.0"
;
xmlDoc.async = false;xmlDoc.resolveExternals = false;xmlDoc.validateOnParse = false;
xmlDoc.load("area.xml"
;
I then run a xpath query on it
att = Area
value = 20
var nH=xmlDoc.selectNodes("/xml/rs:data/z:row[@"+ att +"='"+ value +"']"
this is working fine
now what i want to do is create a select menu from the data queried from the xml file
this is where i am struggling
i know that nH.length value is correct it returns 9 in this example
//alert(nH.length)
for(var i=0;i<nH.length;i++){
nH = nH.nextNode;
alert(nH.attributes.getNamedItem("City"
.value)
}
but this will not iterate - the alert box will only show once.
can anyone explain this to me ?
thanks in advance
var xmlDoc = new ActiveXObject("msxml2.DOMDocument.3.0"
xmlDoc.async = false;xmlDoc.resolveExternals = false;xmlDoc.validateOnParse = false;
xmlDoc.load("area.xml"
I then run a xpath query on it
att = Area
value = 20
var nH=xmlDoc.selectNodes("/xml/rs:data/z:row[@"+ att +"='"+ value +"']"
this is working fine
now what i want to do is create a select menu from the data queried from the xml file
this is where i am struggling
i know that nH.length value is correct it returns 9 in this example
//alert(nH.length)
for(var i=0;i<nH.length;i++){
nH = nH.nextNode;
alert(nH.attributes.getNamedItem("City"
}
but this will not iterate - the alert box will only show once.
can anyone explain this to me ?
thanks in advance