Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<filteredStation>
   <crsCode> a</crsCode>
   <stationName>nave</stationName>
</filteredStation>

<filteredStation>
   <crsCode> adds</crsCode>
   <stationName>naveasd</stationName>
</filteredStation>

<filteredStation>
   <crsCode> dsda</crsCode>
   <stationName>ndsfave</stationName>
</filteredStation>

<filteredStation>
   <crsCode> addssdf</crsCode>
   <stationName>navedsfasd</stationName>
</filteredStation>


How to read station name in this xml ?

JavaScript
var filteredStation = responseXML.getElementsByTagName("filteredStation");
console.log(filteredStation);***getting the xml of filteredStation****


i want to read stationName ?
Posted
Updated 17-Oct-12 4:10am
v3

1 solution

C#
var filteredStation = responseXML.getElementsByTagName("filteredStation");
console.log(filteredStation);***getting the xml of filteredStation****

filteredStation.childNodes[1] = give you object of station name
filteredStation.childNodes[1].innerHTML =  give you value of node station name
 
Share this answer
 
v2
Comments
ravi1989h 17-Oct-12 12:51pm    
Cannot read property '1' of undefined
error comming

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900