[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] schema validation error



On Mon, Sep 22, 2008 at 10:53:14AM +1000, Andrew Canby wrote:
> I am trying to validate some xml with a schema i have. it works great
> when the xml is valid, however as soon as the xml is malformed in one
> way or another it kills my app.
> 
> 
> 
> basically i want to handle the failed validation and keep the app running, not have it die.
> 
> 
> 
> ive been looking at the api for libxml and have found the function
> xmlSchemaSetParserErrors and other similar ones, but im unsure if this
> is the way to go about it.
> 
> 
> 
> does anyone have any experience/ideas?

  I'm not sure i understand your problem. i suggest you use xmllint
--schemas to check that libxml2 does not crash on validation errors,
and suggest you copy paste the relevant code from xmllint.c in your app 
to solve your issue (assuming I understood).

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]