Jump to content

Iterating Through Xml Help


Gazow
 Share

Recommended Posts

if anyone could answer this id greatly appreciate. im a bit confused how iterating through xml worksif i have say three roots with tag album. and each contained several child tags "name". and each name tag has a text value say <name>Bob</name>if i use:var x = getElementsByTagName("album")[0].getElementsByTagName("name");is x now an array of just the first albums name tags right?and if i wanted to access specific names i just call x.childNodes[0].nodeValue;is this right?also does anyone know where i can find a tutorial on how to make a custom picasa web template

Link to comment
Share on other sites

if anyone could answer this id greatly appreciate. im a bit confused how iterating through xml worksif i have say three roots with tag album. and each contained several child tags "name". and each name tag has a text value say <name>Bob</name>if i use:var x = getElementsByTagName("album")[0].getElementsByTagName("name");is x now an array of just the first albums name tags right?and if i wanted to access specific names i just call x[i].childNodes[0].nodeValue;is this right?also does anyone know where i can find a tutorial on how to make a custom picasa web template
Both of your statements are correct. Intead of childNodes[0] you can also use firstChildI'm afraid I don't know of any tutorials for what you're asking, since I've never been on the picasa site. Edited by Ingolme
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...