Difference between revisions of "xml.etree.ElementTree Module"

From GM-RKB
Jump to: navigation, search
m (Text replacement - "“" to "“")
m (Remove links to pages that are actually redirects to this page.)
Line 8: Line 8:
 
=== 2018 ===
 
=== 2018 ===
 
* https://docs.python.org/3/library/xml.etree.elementtree.html
 
* https://docs.python.org/3/library/xml.etree.elementtree.html
** QUOTE: The [[xml.etree.ElementTree Module|xml.etree.ElementTree module]] implements a simple and efficient API for parsing and creating [[XML data]]. ... <P> This is a short tutorial for using [[xml.etree.ElementTree Module|xml.etree.ElementTree (ET in short)]]. The goal is to demonstrate some of the building blocks and basic concepts of the module. ... <P> [[XML]] is an inherently [[hierarchical data format]], and the most natural way to represent it is with a [[tree data structure|tree]]. ET has two classes for this purpose - [[ElementTree]] represents the whole XML document as a tree, and Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level.
+
** QUOTE: The [[xml.etree.ElementTree Module|xml.etree.ElementTree module]] implements a simple and efficient API for parsing and creating [[XML data]]. ... <P> This is a short tutorial for using [[xml.etree.ElementTree Module|xml.etree.ElementTree (ET in short)]]. The goal is to demonstrate some of the building blocks and basic concepts of the module. ... <P> [[XML]] is an inherently [[hierarchical data format]], and the most natural way to represent it is with a [[tree data structure|tree]]. ET has two classes for this purpose - [[xml.etree.ElementTree Module|ElementTree]] represents the whole XML document as a tree, and Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level.
  
 
=== 2017 ===
 
=== 2017 ===

Revision as of 20:45, 23 December 2019

An xml.etree.ElementTree Module is a Python library within xml.etree.



References

2018

2017

  • (Heaton, 2017) ⇒ Jeff Heaton. (2017). “Reading Wikipedia XML Dumps with Python." Blog post
    • QUOTE: … The code below shows you the beginning of this file. As you can see the file is made up of page tags that contain revision tags. … To read this file it is important that the XML is streamed and not read directly into memory as a DOM parser might do. The xml.etree.ElementTree class can be used to do this. The following imports are needed for this example. For the complete source code see the following GitHub link. ...