Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created January 27, 2018 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/7548f86f48c5e84b64d26987968e7049 to your computer and use it in GitHub Desktop.
Save Fhernd/7548f86f48c5e84b64d26987968e7049 to your computer and use it in GitHub Desktop.
Lectura de un archivo (documento) XML en Python.
import xml.etree.ElementTree as ET
estructura_xml = ET.parse('CatalogoProductos.xml')
# Obtiene el elemento raíz:
raiz = estructura_xml.getroot()
for elemento_hijo in raiz:
print (elemento_hijo.tag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment