Provide some examples for usage of ElementTree methods/attributes (issue 15586)

http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementt... File Doc/library/xml.etree.elementtree.rst (right): http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementt... Doc/library/xml.etree.elementtree.rst:40: .. code-block:: xml Nice! http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementt... Doc/library/xml.etree.elementtree.rst:69: tree = ET() Why are you calling the module here? Did you actually execute the examples? Please make sure all examples execute correctly. For loading data from the file, use ElementTree's constructor. No need to invoke the parse method as well. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementt... Doc/library/xml.etree.elementtree.rst:73: Reading the file from a remote URL:: I don't think the urllib example belongs here. It's clear that if ET can build itself from files, streams and strings, than everything that produces those will work. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementt... Doc/library/xml.etree.elementtree.rst:125: If a more strict reliance on tree structure is desired, :meth:`Element.findall` I'd remove the "if a more strict reliance..." part. I'm not sure what it means. The findall/find examples are good http://bugs.python.org/review/15586/
participants (1)
-
eliben@gmail.com