martes, 24 de julio de 2018

Receta Python 3 No. 6-3: Manipular Datos en XML

1. Problema

Extraer y manipular datos desde un documento en formato XML.

2. Solución

El módulo xml cuenta con varios elementos para la manipulación de un documento XML. En particular, la clase ElementTree permite obtener la representación estructural del documento para el recorrido de los elementos de la estructura arbórea (Beazly, Jones, 2013).

3. Código Python 3

Archivo Python manipular-xml.py [enlace alternativo]:

Prueba de ejecución:


Stack Abuse: Cross Validation and Grid Search for Model Selection in Python
Tue, 24 Jul 2018 13:38:00 +0000
http://stackabuse.com/cross-validation-and-grid-search-for-model-selection-in-python/
EuroPython: EuroPython 2018: Get to know other attendees
Tue, 24 Jul 2018 10:37:36 +0000
https://blog.europython.eu/post/176226172432
Mike Driscoll: Understanding Tracebacks in Python
Tue, 24 Jul 2018 05:05:47 +0000
http://www.blog.pythonlibrary.org/2018/07/24/understanding-tracebacks-in-python/
Doing Math with Python: Doing Math with Python in Linux Geek Humble Bundle
Tue, 24 Jul 2018 03:20:00 +0000
http://doingmathwithpython.github.io/humble-bundle-linux-geek.html
Bhishan Bhandari: Python Operators
Mon, 23 Jul 2018 19:32:18 +0000
http://feedproxy.google.com/~r/TheTaraNights/~3/wD-sSXbFmzw/
PyCharm: PyCharm 2018.2 RC 2
Mon, 23 Jul 2018 16:32:55 +0000
http://feedproxy.google.com/~r/Pycharm/~3/opEoXs7_Vzg/
Real Python: Fast, Flexible, Easy and Intuitive: How to Speed Up Your Pandas Projects
Mon, 23 Jul 2018 14:00:00 +0000
https://realpython.com/fast-flexible-pandas/
Sylvain Hellegouarch: How Python and Guido got me my first job and many afterwards
Mon, 23 Jul 2018 13:04:05 +0000
http://www.defuze.org/archives/496-how-python-and-guido-got-me-my-first-job-and-many-afterwards.html
Dataquest: Top 20 Python AI and Machine Learning Open Source Projects
Mon, 23 Jul 2018 12:00:00 +0000
https://www.dataquest.io/blog/top-20-python-ai-and-machine-learning-open-source-projects/
Bhishan Bhandari: File Handling in Python
Mon, 23 Jul 2018 09:36:12 +0000
http://feedproxy.google.com/~r/TheTaraNights/~3/4I-uvlssowQ/
Mike Driscoll: PyDev of the Week: Christopher Neugebauer
Mon, 23 Jul 2018 05:05:55 +0000
http://www.blog.pythonlibrary.org/2018/07/23/pydev-of-the-week-christopher-neugebauer/
Matthew Rocklin: Pickle isn't slow, it's a protocol
Mon, 23 Jul 2018 00:00:00 +0000
https://matthewrocklin.com/blog//work/2018/07/23/protocols-pickle
Philip Semanchuk: A Python 2 to 3 Migration Guide
Sun, 22 Jul 2018 16:52:34 +0000
http://blog.pyspoken.com/2018/02/13/python-2-to-3-migration-guide/
Justin Mayer: Python Development Environment on macOS High Sierra
Sun, 22 Jul 2018 06:00:00 +0000
https://hackercodex.com/guide/python-development-environment-on-mac-osx/
Weekly Python StackOverflow Report: (cxxxv) stackoverflow python report
Sat, 21 Jul 2018 21:21:00 +0000
http://python-weekly.blogspot.com/2018/07/cxxxv-stackoverflow-python-report.html
EuroPython Society: List of EPS Board Candidates for 2018/2019
Sat, 21 Jul 2018 20:58:32 +0000
https://www.europython-society.org/post/176134445630
Bhishan Bhandari: Magic Methods in Python – Dunder Methods
Sat, 21 Jul 2018 19:12:02 +0000
http://feedproxy.google.com/~r/TheTaraNights/~3/7bEQNOpwyRw/
Mike Driscoll: Python 101: Episode #16 – The os Module
Sat, 21 Jul 2018 12:21:31 +0000
http://www.blog.pythonlibrary.org/2018/07/21/python-101-episode-16-the-os-module/
Test and Code: 44: Mentoring - Nina Zakharenko
Sat, 21 Jul 2018 07:15:00 +0000
http://testandcode.com/44
NumFOCUS: NumFOCUS to Hold 2018 Elections for Board of Directors
Fri, 20 Jul 2018 20:54:47 +0000
https://www.numfocus.org/blog/numfocus-to-hold-2018-elections-for-board-of-directors
Bhishan Bhandari: Debugging with breakpoint in Python3.7
Fri, 20 Jul 2018 18:42:42 +0000
http://feedproxy.google.com/~r/TheTaraNights/~3/0NhDXaCirqI/
PyCharm: PyCharm 2018.2 Release Candidate
Fri, 20 Jul 2018 14:13:18 +0000
http://feedproxy.google.com/~r/Pycharm/~3/JCMTX6qp5Zg/
Made With Mu: Mu 1.0.0!
Fri, 20 Jul 2018 14:00:00 +0000
https://madewith.mu/mu/releases/2018/07/20/mu-1.html
Talk Python to Me: #170 Guido van Rossum steps down
Fri, 20 Jul 2018 08:00:00 +0000
https://talkpython.fm/episodes/show/170/guido-van-rossum-steps-down
The No Title® Tech Blog: [Late] Book review – Python Tricks: The Book, by Dan Bader
Fri, 20 Jul 2018 08:00:00 +0000
https://no-title.victordomingos.com/articles/2018/book_review_python_tricks

4. Literatura & Enlaces

Beazly D, Jones B. K. (2013). Python Cookbook, Third Edition. United States: O'Reilly Media.

O

No hay comentarios:

Publicar un comentario

Envíe sus comentarios, dudas, sugerencias, críticas. Gracias.