in reply to Re: Invalid XML characters
in thread Invalid XML characters

Hi,
Thanks for your quick response. I had no knowledge about the entity declaration files that you mentioned. Thus, I was looking for some regex or package that will do the job.
I am currently using XML::Smart for fetching and parsing the XML file. Can you please guide me further about using the entity declaration file along with XML::Smart, so that it will parse the file without crashing.
Thanks

Replies are listed 'Best First'.
Re^3: Invalid XML characters
by mirod (Canon) on Mar 23, 2009 at 11:03 UTC

    As I said, I need to look at a sample of your data, at least the beginning, to see where and how to put the reference to the entity declarations.

    Note that XML::Smart can parse XML 2 different ways: either it uses XML::Parser, which is a real parser and will deal with entities and all the XML features, or it can use its own parse (XML::Smart::Parser, in which case you might be out of luck, according to the docs. If that's the situation you're in, I would consider either using an other XML library, or, if you have to use XML::Smart, pre-processing your XML using xmllint or something similar. Invest a little time now to probably avoid annoying and hard to find bugs in the future.