Thank you, myIP :))
I was doing the same thing(only in AS3), but I`d always get
an error and couldn`t create my XML instance. I eventualy realised
that somehow my string had an extra space, or a newline, or
something, right at the begining, and that was the problem...
Thank you for your help!