<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Import XML file in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317767#M4768</link>
    <description>&lt;P&gt;To make sure that your plugin overrides the original extension you have to provide the &lt;REQUIRE&gt; tag inside your plugin to make sure the components load in the right order.&lt;/REQUIRE&gt;&lt;/P&gt;
&lt;P&gt;Here is a working example of such an override.&lt;/P&gt;
&lt;PRE&gt;

&lt;COMPONENT name="org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins.Override"&gt;
  &lt;REQUIRE&gt;org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins&lt;/REQUIRE&gt;
  &lt;EXTENSION target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService" point="plugins"&gt;
    &lt;PLUGIN name="NoteImporter" class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" order="40"&gt;
      &lt;FILTER&gt;text/plain&lt;/FILTER&gt;
      &lt;FILTER&gt;text/html&lt;/FILTER&gt;
      &lt;FILTER&gt;text/x-web-markdown&lt;/FILTER&gt;
    &lt;/PLUGIN&gt;
  &lt;/EXTENSION&gt;
&lt;/COMPONENT&gt;
&lt;/PRE&gt;
&lt;P&gt;Save it in a file &lt;SOMENAME&gt;-config.xml and place it in the following directory: &amp;lt;NUXEO_HOME&amp;gt;/nxserver/config and restart your server.&lt;/SOMENAME&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A note on the Content-Type&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;It is also worth to note that your xml files have to be valid xml with a correct xml version declaration ( ) so that they can be recognized as being of the correct MIME type: &lt;STRONG&gt;text/xml&lt;/STRONG&gt;. Otherwise they could be recognized as &lt;STRONG&gt;text/plain&lt;/STRONG&gt;, in spite of the file name extension, and then again processed as notes in spite of your valid override definition.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2011 07:49:07 GMT</pubDate>
    <dc:creator>Wojciech_Sulejm</dc:creator>
    <dc:date>2011-12-01T07:49:07Z</dc:date>
    <item>
      <title>Import XML file</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317765#M4766</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to store many XML file as document on nuxeo, but when i import these file using drag n drop, the nuxeo convert this as a Note.&lt;/P&gt;
&lt;P&gt;Anyone have a solution for this?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 23:37:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317765#M4766</guid>
      <dc:creator>Ecoged_</dc:creator>
      <dc:date>2011-11-30T23:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Import XML file</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317766#M4767</link>
      <description>&lt;P&gt;What happens when a file is uploaded (creating a Note, a Picture, a File or a custom type) is configured through the FileManager component, based on the mime type of the uploaded file.
See &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins--plugins" target="test_blank"&gt;http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins--plugins&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;in 5.4.2 (I believe this has been changed in 5.5) the default behavior for xml mile-type file is indeed to create Note, because of the following native contribution:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService"&amp;gt;
&amp;lt;plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" name="NoteImporter"    order="10"&amp;gt;
  &amp;lt;filter&amp;gt;text/plain&amp;lt;/filter&amp;gt;
  &amp;lt;filter&amp;gt;text/html&amp;lt;/filter&amp;gt;
  &amp;lt;filter&amp;gt;application/xhtml+xml&amp;lt;/filter&amp;gt;
  &amp;lt;filter&amp;gt;application/xml&amp;lt;/filter&amp;gt;
  &amp;lt;filter&amp;gt;text/xml&amp;lt;/filter&amp;gt;
  &amp;lt;/plugin&amp;gt;&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can override this contribution with the same name (NoteImporter)  and withdraw text/xml.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2011 07:15:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317766#M4767</guid>
      <dc:creator>Alain_ESCAFFRE</dc:creator>
      <dc:date>2011-12-01T07:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Import XML file</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317767#M4768</link>
      <description>&lt;P&gt;To make sure that your plugin overrides the original extension you have to provide the &lt;REQUIRE&gt; tag inside your plugin to make sure the components load in the right order.&lt;/REQUIRE&gt;&lt;/P&gt;
&lt;P&gt;Here is a working example of such an override.&lt;/P&gt;
&lt;PRE&gt;

&lt;COMPONENT name="org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins.Override"&gt;
  &lt;REQUIRE&gt;org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins&lt;/REQUIRE&gt;
  &lt;EXTENSION target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService" point="plugins"&gt;
    &lt;PLUGIN name="NoteImporter" class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" order="40"&gt;
      &lt;FILTER&gt;text/plain&lt;/FILTER&gt;
      &lt;FILTER&gt;text/html&lt;/FILTER&gt;
      &lt;FILTER&gt;text/x-web-markdown&lt;/FILTER&gt;
    &lt;/PLUGIN&gt;
  &lt;/EXTENSION&gt;
&lt;/COMPONENT&gt;
&lt;/PRE&gt;
&lt;P&gt;Save it in a file &lt;SOMENAME&gt;-config.xml and place it in the following directory: &amp;lt;NUXEO_HOME&amp;gt;/nxserver/config and restart your server.&lt;/SOMENAME&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A note on the Content-Type&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;It is also worth to note that your xml files have to be valid xml with a correct xml version declaration ( ) so that they can be recognized as being of the correct MIME type: &lt;STRONG&gt;text/xml&lt;/STRONG&gt;. Otherwise they could be recognized as &lt;STRONG&gt;text/plain&lt;/STRONG&gt;, in spite of the file name extension, and then again processed as notes in spite of your valid override definition.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2011 07:49:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317767#M4768</guid>
      <dc:creator>Wojciech_Sulejm</dc:creator>
      <dc:date>2011-12-01T07:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Import XML file</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317768#M4769</link>
      <description>&lt;P&gt;Perfect!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2011 23:32:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/import-xml-file/m-p/317768#M4769</guid>
      <dc:creator>Ecoged_</dc:creator>
      <dc:date>2011-12-01T23:32:59Z</dc:date>
    </item>
  </channel>
</rss>

