in reply to XML parsing

If you use an array, everything but the first item will be interpreted as options. So don't do that, use a string instead.

And you have to remove everything that's not XML first.