[GeoNetwork-users] XML Metadata Insert gives "Root element not set"

If I try to import metadata through "XML Metadata Insert" on the
following file, geonetwork reacts with an error message: "Root element
not set"

<?xml version="1.0" encoding="UTF-8"?>
<Metadata xmlns="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
</Metadata>

If I remove the namespace attributes the import works.

Any idea what causes this behaviour?

Willem Nieuwenhuis
nieuwenhuis@anonymised.com

Hi Willem,

did you select the right schema? If you are trying to add a 19139 metadata
you have to provide the full iso 19139 structure. Example:

<DS_DataSet xmlns="http://www.isotc211.org/2005/gmd&quot;
        xmlns:gts="http://www.isotc211.org/2005/gts&quot;
        xmlns:gco="http://www.isotc211.org/2005/gco&quot;
        xmlns:gml="http://www.opengis.net/gml&quot;
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <has>
    <MD_Metadata>
     ...
    </MD_Metadata>
  </has>
</DS_DataSet>

Cheers,
Andrea

If I try to import metadata through "XML Metadata Insert" on the
following file, geonetwork reacts with an error message: "Root element
not set"

<?xml version="1.0" encoding="UTF-8"?>
<Metadata xmlns="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
</Metadata>

If I remove the namespace attributes the import works.

Any idea what causes this behaviour?

Willem Nieuwenhuis
nieuwenhuis@anonymised.com