Jukka Zitting
Fri, 27 Nov 2009 02:05:09 -0800
Hi, On Fri, Nov 27, 2009 at 11:03 AM, Alex Ott <alex...@gmail.com> wrote: > I want to implement a XML handler, that will behave differently, depending > on mime-type of processed document - for example, output CSV for > spreadsheets, etc. > > May i assume, that when XML handler will called, that mime-type information > will already extracted, so i can access to it?
Yes. The parser classes normally set the media type as the first thing they do. Also, if you use the AutoDetectParser or the Tika facade, then mime type detection has already happened and the relevant metadata recorded before parsing begins. BR, Jukka Zitting