I am trying to pull an xml node's value by referencing the value of another node.
Here is an snippet of one of my nodes
<document>
<row>
<DISTRICT>100</DISTRICT>
<BIOS>BROWN</BIOS>
<AREA_KM>3663.158164</AREA_KM>
<AREA_MI>1414.347616</AREA_MI>
<NAME>100</NAME>
<REG>1</REG>
<ACRES>905182</ACRES>
<EMU_Name>Purcell</EMU_Name>
<Shape_Leng>299746.4938</Shape_Leng>
<Shape_Area>3663158164</Shape_Area>
<LegalDesc>Northeast of District 151</LegalDesc>
</row>
</document>
I'd like to fill in some HTML with value from the LegalDesc field based on the # in the DISTRICT field.
for example, I'd like to display the LegalDesc for DISTRICT==100. tempDist value comes from a form with a drop down
Something like this?
function dropDownAction(){
var tempDist=document.HDForm.HuntingDistrict.value;
var tempDesc=xmlDoc.getElementsByTagName("DISTRICT")[tempDist].getAttribute("LegalDesc");
document.getElementById("field2").innerHTML=tempDesc;
}
thank in advance