Is there an example of this "decoration" anywhere? I assume SAX does not come with ability to just add decorator handlers does it?
Thanks Amir > -----Original Message----- > From: Jukka Zitting [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 29, 2007 2:05 PM > To: [email protected] > Subject: Re: Session.importXml - how to monitor progress > > Hi, > > On 8/29/07, Amir Mistric <[EMAIL PROTECTED]> wrote: > > I was wondering if anyone has an idea on how to measure the > progress > > of the file being imported via Session.importXML() method? > I have some > > very large XML files and I would like to at least have a > log message > > outputting progress (e.g. "imported 100 > nodes........200......300....) > > > > Is there a way to do this? > > The easiest and most generic way would probably be to > decorate the ContentHandler instance returned by > getImportContentHandler() with a decorator that for example > counts the number of startElement() or > endElement() calls. > > BR, > > Jukka Zitting >
