Hi Ajay, You haven't stated what you're actually trying to accomplish but I'd like to point out that you can pass a SAXSource [1] as input to the SchemaFactory. That SAXSource can contain an XMLFilter [2] that you've written which wraps a real SAX parser and intercepts the SAX events (doing whatever you feel like with them) before passing them on to the ContentHandler that the SchemaFactory registered with your XMLFilter.
Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/transform/sax/SAXSource.html [2] http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/XMLFilter.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org ajay bhadauria <abhadau...@yahoo.com> wrote on 08/07/2009 01:23:30 PM: > Hi, > > I can register SchemaFactory with errorHandler to get all the error, > fatalError and warning while compiling schema but just wanted to > know that Schema compilation (parsing ) is sax based or dom based internally ? > > Can I register SchemaFactory to java ErrorHandler class to get all > SAX events ? > > Thanks > Ajay > > --- On Fri, 8/7/09, ajay bhadauria <abhadau...@yahoo.com> wrote: > > > From: ajay bhadauria <abhadau...@yahoo.com> > > Subject: SAX events while compiling schema > > To: j-users@xerces.apache.org > > Date: Friday, August 7, 2009, 3:33 PM > > Hi, > > > > I am using javax.xml.validation.SchemaFactory to create > > SchemaFactory using newInstance ( SchemaLanguage) method. > > After that I get Schema Object using newSchema(source) > > method. > > > > How do I register SchemaFactory so that I get all the SAX > > events ? > > > > Thanks > > Ajay > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > > For additional commands, e-mail: j-users-h...@xerces.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-users-h...@xerces.apache.org