September 2026
1051 pages
35h 4m
English
The xml module of the standard library allows you to read and write Extensible Markup Language (XML) files. XML is a standardized description language that makes it possible to store complex, hierarchically structured data in a readable text format. XML therefore can be used very well for exchanging or storing data. Especially in the world of the internet, you can find many description languages based on XML, such as XHTML, RSS, MathML, and SVG.
Let’s take a brief look at XML. The following simple XML file enables you to permanently store the contents of a Python dictionary:
<?xml version="1.0" encoding="UTF-8"?><dictionary> <entry> <key>Hello</key> <value>0</value> </entry> <entry> <key>world</key> <value>1</value> </entry></dictionary> ...
Read now
Unlock full access