Parsing XML
We'll cover the following...
Press + to interact
import xml.etree.ElementTree as etree #①tree = etree.parse('feed.xml') #②root = tree.getroot() #③root #④#<Element {http://www.w3.org/2005/Atom}feed at cd1eb0>
① The ElementTree library is part of the Python standard library, in xml.etree.ElementTree
.
② The primary entry point for the ElementTree library is the parse()
function, which can take a filename or a ...
Access this course and 1400+ top-rated courses and projects.