Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-04-24 14:10:25


Daniel Walker wrote:
> On 4/24/06, Thorsten Ottosen <thorsten.ottosen_at_[hidden]> wrote:

>>At least for my code, a crash is not acceptable compared to a nice popup
>>message: "Error in xml-file: foo";
>
>
> Me too. I've just been trying to say that your code is more likely to
> crash without validation than with because there's more opportunity
> for human error if you're solely relying on hand written, ad hoc error
> checking of the XML.

It's hard to make that assessment.

> So, if crashes are unacceptable, I'd highly
> recommend a validating parser... though apparently it's not currently
> necessary for property_tree or Boost.Serialization.

If the parser itself don't crash, then it's fairly easy to avoid human
errors.

It the parser can crash, then so we have to assume the validation can
too and so validation is another risk.

I use a fairly old version of xerces in my code, I can't change it
easily, nor upgrade easily. I doubt that validation will help anything.
Instead I wrap it in a layer that throws an exception instead of
crashing when the parser is misused.

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk