We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b867b9 commit 49c4f2fCopy full SHA for 49c4f2f
docs/scenarios/xml.rst
@@ -57,7 +57,9 @@ can be loaded into a Python dict like this:
57
.. code-block:: python
58
59
import xmltodict
60
- obj = xmltodict.parse(open('path/to/file.xml'))
+
61
+ with open('path/to/file.xml') as fd:
62
+ obj = xmltodict.parse(fd.read())
63
64
and then you can access elements, attributes and values like this:
65
0 commit comments