[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: To continue parsing after a fatal error.

  • From: Tim Bray <tbray@t...>
  • To: xml-dev@l...
  • Date: Tue, 23 Oct 2001 13:36:32 -0700

xml parsing fatal error
At 12:39 PM 23/10/01 -0700, Joshua Allen wrote:
>This error should occur with any conforming XML processor.  

Indeed.  In fact the whole notion of trying to parse an 800M
doc in one pass seems questionable to me, for exactly the 
problem you're having; in the real world errors will sometimes
happen and you'd like to lose the minimum data.  And Joshua's
right, there's no good way to make an XML parser ignore errors.

In particular, you should challenge whoever's sending you
this stuff because if they claim they're sending you XML
they're incorrect.  There is a very formal and precise
definition of what XML is and your parser is correctly 
claiming that what they're sending you isn't, that's why
it's refusing to process it.

On the other hand, if the situation is that the document
looks like

<file>
 <record>...</record>
 .... repeat many times ...
 </file>

Then a very simple pass-through filter can partition this as it 
goes by and make the downstream code see it as a large number of
more reasonably sized <record> docs rather than as one big <file>
doc.  And if one of the <record> docs contains garbage and blows
up, that's probably a little less painful than losing the whole
800M.   -Tim


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.