PHP 5 Sockets with Flash 8 - Advanced

Hi, I used the tutorial on this site to create the chat room using sockets and got it running. (btw great tutorial, thanks!) At the end of the tutorial (http://www.kirupa.com/developer/flash8/php5sockets_flash8_6.htm) it talks about making a parser for xml to parse data sent from the flash file. I am wondering how to do this.

I wan’t to make it so the people on the chat can give themselfs a name by entering “name <thier name>”

so the parsing would look something like this?
[COLOR=#0000ff]<[/COLOR][COLOR=#000050]CHATROOM[/COLOR] [COLOR=#000050]ACTIONS[/COLOR][COLOR=#0000ff]=[/COLOR][COLOR=#666666]“set_name”[/COLOR] [COLOR=#000050]Name[/COLOR][COLOR=#0000ff]=[/COLOR][COLOR=#666666]“blah blah”[/COLOR] [COLOR=#0000ff]/>[/COLOR]
[COLOR=#0000ff][/COLOR]
(If I ever figure this out eventually I want to make more actions but thought this was a good place to start.)

I am not sure how to parse info that users enter. Any help will be greatly [SIZE=2]
[SIZE=2][SIZE=2]appreciated.
[/SIZE][/SIZE][/SIZE]