Hey Gang,
I’m still not totally understanding the whole “E4X” thing… overall I’m getting better, but I’m having an issue at the moment…
Say I have some XML that looks like this…
<products>
<a id=1>
<achild id=100>Jonas</achild>
<achild id=101>Mattias</achild>
</a>
</products>
That’s very simple example, mind you, but what I want to do is edit the Jonas property, so I would have (assuming I have the entire XML saved as ‘data’)
data..achild.(@id == 100)
But that gives me an XMLList so I cannot make any simple edits, I’ve tried
data..achild.(@id == 100).text = "Fred"
But that is giving me two <achild id=100> nodes with the first not having a closing tag…
If anyone could give me a hand it would be a great help! Thanks a lot!!
**EDIT
**Of course I post and then figure it out, I needed to reference it as an array so data…achild.(@id == 100)[0] worked… thanks for checking though!