ule we have already used the xml sax saxutils module for its xml sax saxutils escape(function (to xml-escape "&"""there is also an xml sax saxutils quoteattr(function that does the same thing but additionally escapes quotes (to make the text suitable for tag' attribute)and xml sax saxutils unescape(to do the opposite conversion two other parsers are available the xml parsers expat module can be used to parse xml documents with expatproviding the expat library is availableand the xml etree elementtree can be used to parse xml documents using kind of dictionary/list interface (by defaultthe dom and element tree parsers themselves use the expat parser under the hood writing xml manually and writing xml using dom and element treesand parsing xml using the domsaxand element tree parsersis covered in there is also third-party librarylxml (www codespeak net/lxml)that claims to be "the most feature-rich and easy-to-use library for working with xml and html in the python language this library provides an interface that is essentially superset of what the element tree module providesas well as many additional features such as support for xpathxsltand many other xml technologies examplethe xml etree elementtree module python' dom and sax parsers provide the apis that experienced xml programmers are used toand the xml etree elementtree module offers more pythonic approach to parsing and writing xml the element tree module is fairly recent addition to the standard libraryand so may not be familiar to some readers in view of thiswe will present very short example here to give flavor of it-provides more substantial example and provides comparative code using dom and sax the government' noaa (national oceanic and atmospheric administrationweb site provides wide variety of dataincluding an xml file that lists the weather stations the file is more than lines long and contains details of around two thousand stations here is typical entrykbos ma bostonlogan international airport the xml etree elementtree module first appeared in python