# Changing xml order

**URL:** <https://forum.kirupa.com/t/changing-xml-order/190022>\
**Category:** Uncategorized\
**Created:** [June 8, 2006, 2:44am UTC](https://forum.kirupa.com/t/changing-xml-order/190022 "2006-06-08T02:44:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bulletz](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bulletz](https://forum.kirupa.com/u/bulletz)\
**Post date:** [June 8, 2006, 2:44am UTC](https://forum.kirupa.com/t/changing-xml-order/190022/1 "2006-06-08T02:44:46Z")

</div>

hello:  
i load an xml file into flash for my mp3 player.  
xml file looks like this;

\<songs\>  
\<song id=“1” name=“song 1 name” src=“pathtosong1”\>  
\<song id=“2” name=“song 2 name” src=“pathtosong2”\>  
\<song id=“3” name=“song 3 name” src=“pathtosong3”\>  
\</songs\>

In my flash player, i’m trying to rearrange the order of the song by “drag and dropping” the name of the song to the new position;  
I then save the “playlist” with the new order.

Is it possible to change the order of the xml nodes in flash then saving it?  
(e.g: changing the order of song2 and song3)

\<songs\>  
\<song id=“1” name=“song 1 name” src=“pathtosong1”\>  
\<song id=“3” name=“song 3 name” src=“pathtosong3”\>  
\<song id=“2” name=“song 2 name” src=“pathtosong2”\>  
\</songs\>

any help is appreciated.  
thanks in advance
