You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by ChadDavis <ch...@gmail.com> on 2010/02/16 01:38:58 UTC

import with a contentHandler

Until I recently read through the specification, I was assuming that
the contentHandler import methods would allow me to write my own
contentHandler methods to process the incoming data.  But it doesn't
seem to work like that.  In fact, I can't really figure out how it
works.

Can some one explain the usage of the ContentHandler import mechanism?

Re: import with a contentHandler

Posted by Stefan Guggisberg <st...@gmail.com>.
On Tue, Feb 16, 2010 at 1:38 AM, ChadDavis <ch...@gmail.com> wrote:
> Until I recently read through the specification, I was assuming that
> the contentHandler import methods would allow me to write my own
> contentHandler methods to process the incoming data.  But it doesn't
> seem to work like that.  In fact, I can't really figure out how it
> works.
>
> Can some one explain the usage of the ContentHandler import mechanism?
>

you can e.g. write your own sax ContentHandler,  wrapping/decorating the
one returned by Session/Workspace#getImportContentHandler().

in your implementation you could for example manipulate/filter the sax events
reported by the sax parser before feeding them to the underlying
content handler.

cheers
stefan