Skip to content

Commit

Permalink
Actually fix xmltodict usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmavirus24 committed May 27, 2014
1 parent 1b867b9 commit 49c4f2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/scenarios/xml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ can be loaded into a Python dict like this:
.. code-block:: python
import xmltodict
obj = xmltodict.parse(open('path/to/file.xml'))
with open('path/to/file.xml') as fd:
obj = xmltodict.parse(fd.read())
and then you can access elements, attributes and values like this:

Expand Down

0 comments on commit 49c4f2f

Please sign in to comment.