I am trying to read this url and trying to extract the information between this tag: "identificationInfo"
However, when I use this code:
import requests
import xml.etree.ElementTree as ET
url = "http://qldspatial.information.qld.gov.au/catalogue/rest/document?id={96BD66CE-2207-4D35-815B-0E5648C0185F}&f=xml"
response = requests.get(url)
xml_content = response.content
tree = ET.fromstring(xml_content)
for child in tree:
print(child.tag, child.attrib)
but the results I get back don't contain any attributes for the tags.
('{http://www.isotc211.org/2005/gmd}fileIdentifier', {})
('{http://www.isotc211.org/2005/gmd}language', {})
('{http://www.isotc211.org/2005/gmd}characterSet', {})
('{http://www.isotc211.org/2005/gmd}parentIdentifier', {})
('{http://www.isotc211.org/2005/gmd}hierarchyLevel', {})
('{http://www.isotc211.org/2005/gmd}contact', {})
('{http://www.isotc211.org/2005/gmd}dateStamp', {})
('{http://www.isotc211.org/2005/gmd}metadataStandardName', {})
('{http://www.isotc211.org/2005/gmd}metadataStandardVersion', {})
('{http://www.isotc211.org/2005/gmd}referenceSystemInfo', {})
('{http://www.isotc211.org/2005/gmd}identificationInfo', {})
('{http://www.isotc211.org/2005/gmd}distributionInfo', {})
('{http://www.isotc211.org/2005/gmd}dataQualityInfo', {})
('{http://www.isotc211.org/2005/gmd}metadataConstraints', {})`
I am not familiar with xml, and I can't work out why I can't see any more information. Am I missing a step? If someone could assist, it would greatly be appreciated.
The 72 Fish Habitat Areas in this dataset are declared under Section 120 - Fisheries Act-1994 and Schedule 3-Queensland Fisheries Regulations 2008, effective 30 September 2016. This is a composite of ALL Fish Habitat Area boundary...? Orxmltree ofidentificationInfo?<date> <gco:Date>2014-09-05</gco:Date> </date>and<CI_ResponsibleParty id="resourceOwner"> <organisationName> <gco:CharacterString>Department of National Parks, Sport and Racing</gco:CharacterString> </organisationName>. I need to pull this information from other xmls of the same structure so I am trying to automate this.