Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-1842

XML file detected as HTML

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.11
    • None
    • detector
    • None

    Description

      A file containing this xml:

      <note>
          <to>Tove</to>
          <from>Jani</from>
          <heading>Reminder</heading>
          <body>Don't forget me this weekend!</body>
      </note>
      

      is detected as text/html instead of application/xml (or at worst text/plain) when using this code sample:

      Tika tika = new Tika();
      System.out.println(tika.detect(new File("src/test/resources/file.xml"))));
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yenox Jean Coudon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: