You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Torgeir Veimo <to...@pobox.com> on 2009/02/11 08:55:20 UTC

custom xml import

I have a small project where I'd like to import a fragment of an xml  
file, and I have to use my own custom entity resolver. Ideally, I'd  
like to specify which node to import using an xpath query. Have anyone  
done something similar and have some code to share?

-- 
Torgeir Veimo
torgeir@pobox.com





Re: custom xml import

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Feb 11, 2009 at 8:55 AM, Torgeir Veimo <to...@pobox.com> wrote:
> I have a small project where I'd like to import a fragment of an xml file,
> and I have to use my own custom entity resolver. Ideally, I'd like to
> specify which node to import using an xpath query. Have anyone done
> something similar and have some code to share?

The easiest approach to this is probably to apply an XSL
transformation to the source XML before passing it to an import
content handler. A JAXP Transformer should do the trick.

BR,

Jukka Zitting