# How to add nodes in xml file at specific position?

**URL:** <https://forum.kirupa.com/t/how-to-add-nodes-in-xml-file-at-specific-position/233289>\
**Category:** flash\
**Created:** [July 22, 2007, 1:26pm UTC](https://forum.kirupa.com/t/how-to-add-nodes-in-xml-file-at-specific-position/233289 "2007-07-22T13:26:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![psych](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/psych/32/2839_2.png) [@psych](https://forum.kirupa.com/u/psych)\
**Post date:** [July 22, 2007, 1:26pm UTC](https://forum.kirupa.com/t/how-to-add-nodes-in-xml-file-at-specific-position/233289/1 "2007-07-22T13:26:34Z")

</div>

Lets say i have the following xml file which i load in Flash:

```auto

<example>
    <items title="something>
      <img id="image"/>
      <audio id="audio" />
      <text id="text"/>
    </items>
</example>

```

And i would like to add the following line:

```auto

<video id="video"> 

```

after the node so that input xml looks like this:

```auto

<example>
    <items title="something>
      <img id="image"/>
      <audio id="audio"/>
      <video id="video"/>
      <text id="text"/>
    </items>
</example>

```

I’ve done the loading part but can’t figure it out how to add new node at specific position. Can someone please show me how to do that ?

thanks a lot
