From: Mark Thomas Date: 2008-10-01T03:54:06+09:00 Subject: Re: rexml exceptions On Sep 30, 2:09 pm, Eric Will wrote: > My situation requires SAX, unfortunately. > > I need to parse and react to each tag as in comes in. If there's a > broken one, all tags up to the broken one must be processed, and the > broken one must be stored. I cannot do this in DOM, because if there's > an error, DOM will not process anything. If you can receive an entire document at a time, libxml has a 'recover' mode that will correct what it can and process the entire document -- even if it is not well-formed. It works surprisingly well. Another option is writing your own recursive descent parser. See http://snippets.dzone.com/posts/show/2190 for a starting point. -- Mark.