logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

RE: Schema validation doesn't occur: msg#00014

Subject: RE: Schema validation doesn't occur
Hi Ugo,

"Ugo Corda" <ugo@xxxxxxxxxx> wrote on 06/08/2006 08:31:07 PM:

> Actually, I just noticed that validation does occur (I see the error
> messages produced), but what I was expecting was some kind of 
> exception to be thrown by "parse". Instead, I only get error 
> messages on the console, and the program continues execution as if 
> nothing happened.
>
> Is there a way to get an exception to be thrown when the xml 
> document does not follow the schema?

Yes. Write an ErrorHandler [1] which throws exceptions and register it 
with the parser.
 
> Thank you,
> Ugo

[1] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ErrorHandler.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx 



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo