Hi!
I’m updating an old AS2 project and have a question about XML. This thing I’m working on uses two xml files, pics.xml and lang.xml. The last one of the two contains translations for the flash file and looks like this:
<lang>
<trans lang="sv">
<nextPic>Nästa bild</nextPic>
<prevPic>Föregående bild</prevPic>
<showMap>Visa karta</showMap>
</trans>
<trans lang="en">
<nextPic>Next picture</nextPic>
<prevPic>Previous picture</prevPic>
<showMap>Show Map</showMap>
</trans>
</lang>
and in the pics.xml you choose what language to display by setting an xml attribute to either “sv” or “en”.
My question is, how do I tell the function that parses lang.xml to only parse the node with the right language. If “sv” is set in pics.xml I only want to parse the first bit om lang.xml there, you se what I mean? I don’t what to use something like: this.firstChild.childNodes[0].blahblah cos most likely the users of this will ad more languages…