in reply to well formed xml

You could try XML::Simple. You don't have to define any handlers, just give it the text, and it will parse it. It will also die in case of malformed input, but in this case I think it's a legitimate application of eval. See the "Error handling" section of the XML::Simple docs.

--ZZamboni