This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Document why xml.etree.ElementTree.Element has no reference to parent
Type: enhancement Stage: resolved
Components: Documentation Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: docs@python Nosy List: akuchling, amaury.forgeotdarc, docs@python, ned.deily, techtonik
Priority: normal Keywords:

Created on 2011-03-02 01:58 by techtonik, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg129848 - (view) Author: anatoly techtonik (techtonik) Date: 2011-03-02 01:58
There is no way to get parent element from xml.etree.ElementTree.Element. This is one of the essential functions for XML support.
msg129850 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-03-02 03:02
ElementTree Element has no parent link by design.  See the "Accessing Parents" topic (http://effbot.org/zone/element.htm) in the supplemental documentation for ElementTree linked from the Python Standard Library doc set (http://docs.python.org/py3k/library/xml.etree.elementtree.html).
msg129895 - (view) Author: anatoly techtonik (techtonik) Date: 2011-03-02 14:20
That's not a good reason to close report. Such limitations of xml.etree.ElementTree should be at least documented properlt. And even documented it is still a valid feature request for standard library. Not for current implementation, but perhaps for Python4.
msg129897 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-03-02 14:34
Anatoly, do you find the suggestions in http://effbot.org/zone/element.htm#accessing-parents useful to you?  If so, this paragraph could be copied into the documentation.
msg130051 - (view) Author: anatoly techtonik (techtonik) Date: 2011-03-04 13:32
I still struggling to find a way to apply http://effbot.org/zone/element.htm#accessing-parents in my specific case. Unfortunately, it doesn't seem trivial to me.
msg130053 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-03-04 13:40
This is a question for comp.lang.python ;-)
msg280173 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2016-11-06 21:11
Closing this old issue.
History
Date User Action Args
2022-04-11 14:57:13adminsetgithub: 55577
2016-11-06 21:11:39akuchlingsetstatus: open -> closed
nosy: + akuchling
messages: + msg280173

2011-03-04 13:40:41amaury.forgeotdarcsetnosy: amaury.forgeotdarc, techtonik, ned.deily, docs@python
messages: + msg130053
2011-03-04 13:32:08techtoniksetnosy: amaury.forgeotdarc, techtonik, ned.deily, docs@python
messages: + msg130051
2011-03-04 07:38:12georg.brandlsetnosy: amaury.forgeotdarc, techtonik, ned.deily, docs@python
title: xml.etree.ElementTree.Element should have a reference to parent -> Document why xml.etree.ElementTree.Element has no reference to parent
2011-03-04 07:37:55georg.brandlsetassignee: docs@python

components: + Documentation, - XML
nosy: + docs@python
2011-03-02 14:34:09amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg129897
2011-03-02 14:20:25techtoniksetstatus: closed -> open

type: enhancement
messages: + msg129895
nosy: techtonik, ned.deily
2011-03-02 03:02:52ned.deilysetstatus: open -> closed

nosy: + ned.deily
messages: + msg129850

resolution: rejected
stage: resolved
2011-03-02 01:58:34techtonikcreate