I have a metadata string in a file and want to export this to its own attributes so I can export it to a database.
If i use the fragmenter it gives only <missing> as output. I have elements to match: gmi:MI_Metadata and expose gmd:fileIdentifier.
Same happens when i use the XMLflattener. I can't figure out what i'm doing wrong. Being stuck at this for a few days already. Only solution what worked for me was
- Export to XML
- Open XML in Sublime text to Replace < for < and > for >
- Open the XML in a new workflow to extract to databases
Sometimes i get this message
message:prefix 'gmi' can not be resolved to namespace URI
Example:
<?xml version="1.0" encoding="UTF-8"?>
<!-- BAG Metadata - Created with: -vSABER_5.2.0.9.5ISO TC211 schema -->
<gmi:MI_Metadata xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:bag="http://www.opennavsurf.org/schema/bag">
<gmd:fileIdentifier><gco:CharacterString>19495cff-1e71-1b03-0ad9-03766b8b4567</gco:CharacterString></gmd:fileIdentifier>
<gmd:language>
<gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/" codeListValue="eng">eng</gmd:LanguageCode>
</gmd:language>
<gmd:characterSet>
<gmd:MD_CharacterSetCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode" codeListValue="utf8">utf8</gmd:MD_CharacterSetCode>
</gmd:characterSet>
<gmd:hierarchyLevel>
<gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset">dataset</gmd:MD_ScopeCode>
</gmd:hierarchyLevel>
<gmd:contact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>Paul L. Donaldson</gco:CharacterString>
</gmd:individualName>
<gmd:positionName><gco:CharacterString>Lead Hydrographer</gco:CharacterString> </gmd:positionName>
<gmd:role>
<gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact">pointOfContact</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:contact>
</gmi:MI_Metadata>
Can someone help me in the right direction?