> XercesDOMParser *parser = new XercesDOMParser; > DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter ();
Do you really need to build a DOM tree? > It seems that each call to event () is fairly expensive - running at about 23 docs/sec > on my system here at work I can't give an opinion on this performance figure, since you've provided no information about your hardware, operating system, or compiler. > MemBufInputSource *buffer = new MemBufInputSource ( (const XMLByte *) xml, > strlen ( xml ), > id, > false ); It's much better to create an object as small as MemBufInputSource on the stack: MemBufInputSource buffer((const XMLByte *) xml, strlen ( xml ), id, false); parser->parse ( buffer ); If you don't really need DOM trees, then you probably shouldn't build them. Also, there will be a certain amount of overhead for that does not vary according the the size of the document. Some of it you can potentially avoid, and some you cannot. For example, if you know the schemas you'll be working with up front, you can cache them in the parser. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]