title: How to read kml file with specific identifier in python?
body: <p>I am trying to read these kml-files provided by german weather service: <a href="https://www.dwd.de/DE/leistungen/opendata/help/schluessel_datenformate/kml/mosmix_example_data_zip.zip?__blob=publicationFile&amp;v=1" rel="nofollow noreferrer">example_data</a></p>
  
  <p>With the following code I am not able to get access to the <code>dwd:</code> children:</p>
  
  <pre><code>from zipfile import ZipFile
  from lxml import html
  from urllib.request import urlretrieve
  
  urlretrieve('http://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/10641/kml/MOSMIX_L_LATEST_10641.kmz')
  
  kmz = ZipFile("local_data.kmz", 'r')
  kml = kmz.open(kmz.filelist[0].filename, 'r').read()
  
  root = parser.fromstring(kml)
  </code></pre>
  
  <p>With the <code>root.Document.Placemark.ExtendedData.getchildren()</code> command I am able to access the following list (length is 114, i cut it here):</p>
  
  <pre><code>[&lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71705b2b08&gt;,
   &lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71706befc8&gt;,
   &lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71706bef88&gt;,
   &lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71706bebc8&gt;,
   &lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71706bea88&gt;,
   &lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71706beb08&gt;,
   &lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71706be848&gt;,
   &lt;Element {https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd}Forecast at 0x7f71706be988&gt;]
  </code></pre>
  
  <p>But with <code>root.Document.Placemark.ExtendedData.Foreast</code> I get the following error message: </p>
  
  <pre><code>AttributeError: no such child: {http://www.opengis.net/kml/2.2}Forecast
  </code></pre>
  
  <p>I guess the problem is that the standard opengis kml Schema is used. How can I access the data?</p>
  
  <p>This is the head of a file: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?&gt;
  &lt;kml:kml xmlns:dwd="https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"&gt;
      &lt;kml:Document&gt;
          &lt;kml:ExtendedData&gt;
              &lt;dwd:ProductDefinition&gt;
                  &lt;dwd:Issuer&gt;Deutscher Wetterdienst&lt;/dwd:Issuer&gt;
                  &lt;dwd:ProductID&gt;DWD_MOSMIX_1H&lt;/dwd:ProductID&gt;
                  &lt;dwd:GeneratingProcess&gt;DWD MOSMIX hourly, Version 1.0&lt;/dwd:GeneratingProcess&gt;
                  &lt;dwd:IssueTime&gt;&lt;/dwd:IssueTime&gt;
                  &lt;dwd:ReferencedModel&gt;
                      &lt;dwd:Model dwd:name="ICON" dwd:referenceTime="2018-05-17T00:00:00Z"/&gt;
                      &lt;dwd:Model dwd:name="ECMWF/IFS" dwd:referenceTime="2018-05-17T00:00:00Z"/&gt;
                  &lt;/dwd:ReferencedModel&gt;
                  &lt;dwd:ForecastTimeSteps&gt;
                      &lt;dwd:TimeStep&gt;2018-05-17T10:00:00.000Z&lt;/dwd:TimeStep&gt;
                      &lt;dwd:TimeStep&gt;2018-05-17T11:00:00.000Z&lt;/dwd:TimeStep&gt;
                      &lt;dwd:TimeStep&gt;2018-05-17T12:00:00.000Z&lt;/dwd:TimeStep&gt;
                      &lt;dwd:TimeStep&gt;2018-05-17T13:00:00.000Z&lt;/dwd:TimeStep&gt;
                      &lt;dwd:TimeStep&gt;2018-05-17T14:00:00.000Z&lt;/dwd:TimeStep&gt;
                      &lt;dwd:TimeStep&gt;2018-05-17T15:00:00.000Z&lt;/dwd:TimeStep&gt;
  </code></pre>