On Tue, 10 May 2016, [email protected] wrote:
But now I'm facing of detecting some XML files but only some specifics,
I can't detect only "application/xml", I need to detect which type of
XML is it (in my case
http://www.iab.com/guidelines/digital-video-ad-serving-template-vast-3-0/).
But the file uploaded are always terminated with .xml extension and with
the "application/xml" content-type metadata.
So how can I detect this kind of specific XML with same mime type and
same file extension than the generic XML Parser?
You should add acustom mimetype:
http://tika.apache.org/1.12/parser_guide.html#Add_your_MIME-Type
Have that extend application/xml and define the root xml element your
format requires. If you look at the main tika mime types file, there's a
few good examples almost at the top
Nick