Hi,

On Tue, Apr 17, 2012 at 3:32 PM, Uwe Schindler <[email protected]> wrote:
> I think the problem is that the detection does not see the filename. If you
> pass a InputStream to the detection method, you should also pass metadata
> (including the file name).

Tika should have no trouble detecting XML also from just the byte stream.

A typical reason why an XML document is detected as text/plain is if
it's actually not valid XML, either because of some well-formedness
issue (unclosed tags) or because of some extra characters like
suggested by Nick.

BR,

Jukka Zitting

Reply via email to