<div dir="ltr">You might find this notebook useful also:<div><a href="https://github.com/ioos/notebooks_demos/blob/master/notebooks/csw_search_examples/csw_search_example.ipynb">https://github.com/ioos/notebooks_demos/blob/master/notebooks/csw_search_examples/csw_search_example.ipynb</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 9, 2016 at 3:04 PM, Tom Kralidis <span dir="ltr"><<a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On Fri, 9 Sep 2016, Henrik Schuller wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Date: Fri, 9 Sep 2016 15:11:10 +0200<br>
From: Henrik Schuller <<a href="mailto:hgs716@gmail.com" target="_blank">hgs716@gmail.com</a>><br>
To: Tom Kralidis <<a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a>>, <a href="mailto:owslib-users@lists.osgeo.org" target="_blank">owslib-users@lists.osgeo.org</a><br>
Subject: Re: [OWSLib-users] OWSlib - CSW metadata<span class=""><br>
<br>
Thx alot Tom, now i got alot more information out of the CSW :)<br>
<br>
Maybe just me that is inexperienced, but how do i get information out of<br>
objects like the ones i get here:<br>
<br>
from owslib.csw import CatalogueServiceWeb<br>
<br>
csw = CatalogueServiceWeb('<a href="http://www.geonorge.no/geonetwork/srv/nor/csw-service?" rel="noreferrer" target="_blank">http://ww<wbr>w.geonorge.no/geonetwork/srv/<wbr>nor/csw-service?</a>')<br>
csw.getrecords2(typenames='gmd<wbr>:MD_Metadata', esn='full', resulttype="results",<br>
               outputschema="<a href="http://www.isotc211.org/2005/gmd" rel="noreferrer" target="_blank">http://www.isot<wbr>c211.org/2005/gmd</a>", maxrecords=50)<br>
<br>
for rec in csw.records:<br>
   print((csw.records[rec].ident<wbr>ification.contact))<br>
<br>
</span></blockquote>
<br>
Your best bet is to inspect OWSLib's ISO implementation [1] to see how we parse the XML<br>
into Python objects.<br>
<br>
[1] <a href="https://github.com/geopython/OWSLib/blob/master/owslib/iso.py" rel="noreferrer" target="_blank">https://github.com/geopython/O<wbr>WSLib/blob/master/owslib/iso.p<wbr>y</a><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
>From Henrik<br>
<br>
<br>
<br>
2016-09-09 12:55 GMT+02:00 Tom Kralidis <<a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
On Fri, 9 Sep 2016, Henrik Schuller wrote:<br>
<br>
Date: Fri, 9 Sep 2016 12:57:24 +0200<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Henrik Schuller <<a href="mailto:hgs716@gmail.com" target="_blank">hgs716@gmail.com</a>><br>
To: <a href="mailto:OWSLib-users@lists.osgeo.org" target="_blank">OWSLib-users@lists.osgeo.org</a><br>
Subject: [OWSLib-users] OWSlib - CSW metadata<br>
<br>
Hi,<br>
<br>
<br>
<br>
I am using OWSlib to GetRecords from a CSW<br>
(*<a href="http://www.geonorge.no/geonetwork/srv/nor/csw-service" rel="noreferrer" target="_blank">http://www.geonorge.no/geone<wbr>twork/srv/nor/csw-service</a><br>
<<a href="http://www.geonorge.no/geonetwork/srv/nor/csw-service" rel="noreferrer" target="_blank">http://www.geonorge.no/geonet<wbr>work/srv/nor/csw-service</a>>*, but I would<br>
like<br>
to get more information about the records than what is given in dublin<br>
core. Is there any easy way that I could get information like<br>
gmd:individualName or srv:operatesOn for every record?<br>
<br>
<br>
I can see that this information is available in OWSlib - iso, but I don't<br>
see an easy way to implement it for the csw.records.<br>
<br>
<br>
</blockquote>
Try doing the getrecords2 request using ISO as the outputschema (Dublin<br>
Core<br>
is default):<br>
<br>
from owslib.csw import CatalogueServiceWeb<br>
<br>
csw = CatalogueServiceWeb('<a href="http://www.geonorge.no/geonetwork/srv/" rel="noreferrer" target="_blank">http://ww<wbr>w.geonorge.no/geonetwork/srv/</a><br>
nor/csw-service')<br>
<br>
csw.getrecords2(outputschema='<a href="http://www.isotc211.org/2005/gmd" rel="noreferrer" target="_blank"><wbr>http://www.isotc211.org/2005/g<wbr>md</a>')<br>
<br>
The CSW will then return the ISO representation of matching metadata<br>
records.<br>
<br>
Hope this helps<br>
<br>
..Tom<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Henrik<br>
<br>
<br>
</blockquote></blockquote>
<br>
</blockquote></div></div><div class="HOEnZb"><div class="h5">
______________________________<wbr>_________________<br>
OWSLib-users mailing list<br>
<a href="mailto:OWSLib-users@lists.osgeo.org" target="_blank">OWSLib-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/owslib-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman<wbr>/listinfo/owslib-users</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Dr. Richard P. Signell   (508) 457-2229<br>USGS, 384 Woods Hole Rd.  <br>Woods Hole, MA 02543-1598</div>
</div>