(exml)
return [identifier, vals, regions, keywords]
generate dict of properties from gmd:MD_Metadata
generate dict of properties from gmd:MD_Metadata
generate dict of properties from gmd : MD_Metadata
def iso2dict(exml):
    """generate dict of properties from gmd:MD_Metadata"""

    vals = {}
    regions = []
    keywords = []

    mdata = MD_Metadata(exml)
    identifier = mdata.identifier
    vals['language'] = mdata.language or mdata.languagecode or 'eng'
    vals['spatial_representation_type'] = mdata.hierarchy
    vals['date'] = sniff_date(mdata.datestamp)

    if hasattr(mdata, 'identification'):
        vals['title'] = mdata.identification.title
        vals['abstract'] = mdata.identification.abstract
        vals['purpose'] = mdata.identification.purpose

        if mdata.identification.supplementalinformation is not None:
            vals['supplemental_information'] = \
                mdata.identification.supplementalinformation

        vals['temporal_extent_start'] = \
            mdata.identification.temporalextent_start
        vals['temporal_extent_end'] = \
            mdata.identification.temporalextent_end

        if len(mdata.identification.topiccategory) > 0:
            vals['topic_category'] = mdata.identification.topiccategory[0]

        if (hasattr(mdata.identification, 'keywords') and
                len(mdata.identification.keywords) > 0):
            for kw in mdata.identification.keywords:
                if kw['type'] == "place":
                    regions.extend(kw['keywords'])
                else:
                    keywords.extend(kw['keywords'])

            keywords = convert_keyword(mdata.identification.keywords, iso2dict=True)

        if len(mdata.identification.otherconstraints) > 0:
            vals['constraints_other'] = \
                mdata.identification.otherconstraints[0]

        vals['purpose'] = mdata.identification.purpose

    if mdata.dataquality is not None:
        vals['data_quality_statement'] = mdata.dataquality.lineage

    return [identifier, vals, regions, keywords]
def iso2dict ( exml ) : vals = { } regions = [ ] keywords = [ ] mdata = MD_Metadata ( exml ) identifier = mdata . identifier vals [ 'language' ] = mdata . language or mdata . languagecode or 'eng' vals [ 'spatial_representation_type' ] = mdata . hierarchy vals [ 'date' ] = sniff_date ( mdata . datestamp ) if hasattr ( mdata , 'identification' ) : vals [ 'title' ] = mdata . identification . title vals [ 'abstract' ] = mdata . identification . abstract vals [ 'purpose' ] = mdata . identification . purpose if mdata . identification . supplementalinformation is not None : vals [ 'supplemental_information' ] = mdata . identification . supplementalinformation vals [ 'temporal_extent_start' ] = mdata . identification . temporalextent_start vals [ 'temporal_extent_end' ] = mdata . identification . temporalextent_end if len ( mdata . identification . topiccategory ) > 0 : vals [ 'topic_category' ] = mdata . identification . topiccategory [ 0 ] if ( hasattr ( mdata . identification , 'keywords' ) and len ( mdata . identification . keywords ) > 0 ) : for kw in mdata . identification . keywords : if kw [ 'type' ] == "place" : regions . extend ( kw [ 'keywords' ] ) else : keywords . extend ( kw [ 'keywords' ] ) keywords = convert_keyword ( mdata . identification . keywords , iso2dict = True ) if len ( mdata . identification . otherconstraints ) > 0 : vals [ 'constraints_other' ] = mdata . identification . otherconstraints [ 0 ] vals [ 'purpose' ] = mdata . identification . purpose if mdata . dataquality is not None : vals [ 'data_quality_statement' ] = mdata . dataquality . lineage return [ identifier , vals , regions , keywords ]