|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Reusing a JAXP SAX parser
Title: Reusing a JAXP SAX parser hi I have a situation where I'm parsing many instances of a document conforming to a given schema.
I'm able to reuse the same parser without any problems, but I'm concerned that I may be experiencing uncessary overhead in processing the schemas associated with the document I'm parsing. I'm using the following to setup my parser i.e. using JAXP: SAXParserFactory spf = SAXParserFactory.newInstance();
for each document input stream: parser.parse(inputStream, handler); I find that my entity resolver gets called for each schema in the list of schemas for each document I process (which I guess isn't suprising given that the entity resolver is a feature of the handler which is passed into the parse call). However, this means that the parser is presumably parsing the same schema instance for every document. It would be nice if the parser could be setup with the schemas just once. My underlying parser is xerces 2.2 Is this just something I shouldn't be worried about? Is is something that can be accomplished by using the parser's native interface? Thanks
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








