# E4X Problem

**URL:** <https://forum.kirupa.com/t/e4x-problem/249414>\
**Category:** Uncategorized\
**Created:** [January 18, 2008, 1:41pm UTC](https://forum.kirupa.com/t/e4x-problem/249414 "2008-01-18T13:41:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dewey](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dewey](https://forum.kirupa.com/u/dewey)\
**Post date:** [January 18, 2008, 1:41pm UTC](https://forum.kirupa.com/t/e4x-problem/249414/1 "2008-01-18T13:41:52Z")

</div>

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…

```auto

<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’)

```auto
data..achild.(@id == 100)

```

But that gives me an XMLList so I cannot make any simple edits, I’ve tried

```auto
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!
