This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to get all attributes of a tag in an XML document using javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to get all attributes of a tag in an XML document using javascript?" Watch "How to get all attributes of a tag in an XML document using javascript?" New topic
Author

How to get all attributes of a tag in an XML document using javascript?

Kris Noah
Greenhorn

Joined: Oct 11, 2010
Posts: 2
Hi,

I have an xml file of the form:

etc...

I already have my program (mixture of JSP and javascript/ajax) able to retrieve all the latitude and longitude points from the XML file:


I've written other code using the Google Maps API to use these points to plot "polylines" onto the map. My question is how would I be able to only colour in, say, the points for bumper1 or bumper2? But not all. So when I call the GPolyline function for bumper1 or bumper2 etc, it will only plot the points for the intended tag. Currently it plots a Polyline for all the co-ordinates in a single colour.

I would need to store the lat/long points for these in some sort of an array and simply pass it to map.addOverlay(new GPolyline([b]pts,colour,width));[/b] is my understanding (Like: new GPolyline(some statement corresponding to all the points for bumper1, colour, width) ). Can someone please shed some light on this for me?

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get all attributes of a tag in an XML document using javascript?
 
Similar Threads
Pop up calendar Problem
JSlider is not working.
JSlider is not working.
Javascript not detecting argument passed by JSP code
AWT Event look for help