[New-bugs-announce] [issue15586] Provide some examples for usage of ElementTree methods/attributes

Sarbjit singh report at bugs.python.org
Wed Aug 8 08:34:39 CEST 2012

New submission from Sarbjit singh:

Please provide some basic usage examples for ElementTree module documentation. While parsing an xml, most common scenarios will be reading elements from xml, modifying elements, removal of elements. Though there are few examples given for modification of xml element. 

But if you look from beginners learning point of view, its very hard to just get any idea from the example that is currently provided. There is lot of text there, but what would be more helpful is some small examples for each function so that user can quickly understand its usage there only.  I myself is learning Python, but in order to start using this module, i had to search lot of articles on internet on usage of this module. If we could have provided some basic use cases in Python doc itself, user would not have to rely on external sources for learning its usage.

Some Basic Scenarios:
1) Parsing an xml and finding some elements of xml
2) deletion of an element from an xml and writing back
3) Modification of an xml element
4) Usage of XPath queries (some basic usage)

assignee: docs at python
components: Documentation
messages: 167670
nosy: Sarbjit.singh, docs at python, eli.bendersky
priority: normal
severity: normal
status: open
title: Provide some examples for usage of ElementTree methods/attributes
type: enhancement

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list