Hi Kiran, Take a look at http://xml.apache.org/xerces-c/program-dom.html#continue-after-fatal, for example. There are similar features for the DOMBuilder and SAXParsers.
They are totally caveat emptor: no guarantees are made about what the parser might do if this feature is set. My guess would be that invalid characters in element content won't cause it to blow up too badly, but you never know... Bottom line is that XML parsers are in the business of parsing XML documents; they'll tell you when something isn't an XML document, but if you insist on forcing the parser to process something that it's not expecting, you're on your own. Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] |---------+----------------------------> | | "Bagepalli, | | | Kiran" | | | <[EMAIL PROTECTED]| | | matica.com> | | | | | | 06/16/2003 06:06 | | | PM | | | Please respond to| | | xerces-c-dev | | | | |---------+----------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: <[EMAIL PROTECTED]> | | cc: | | Subject: Continue on error | | | | | >---------------------------------------------------------------------------------------------------------------------------------------------| Is there anyway I could get the context of an error if it happens. Currently I get the line/column no where the error happened. I have a case where there are invalid characters(for that encoding) in a file. I would like to skip and continue parsing the file. My question is how effective would be continuing the scan. Is the parser written to recover from a previous failure. For eg. <TEST> BAD-DATA </TEST>. Is there anyway I could ignore the invalid characters for TEST tag while parsing. If I do would the scanner be able to recover from this failure and understand </TEST> is the end tag. My need is if there is a way to skip bad character content and continue parsing. Thanks Kiran --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]