There appears to be nothing wrong with that code (well, you're loading XML::Parser unnecessarily - but that's not a huge problem).
I can only repeat what I said in my previous post.
That's a problem in the syntax of your XML, not an error in the way that you are using the module.
Perhaps you should take a look at column 43 on line 1 and work out why that character makes your XML invalid.
The problem is NOT with the way you are using the module. The problem is with the data that you are feeding to the module. You think that the data is XML. The module doesn't think it is valid XML. You need to clean up your input data.
|