Tim Chambers <tygru...@gmail.com> added the comment:

I suggest adding the option to keep the namespace prefixes in the tree when 
reading in (will it need to set a tree wide variable for the instance?). I 
haven't looked at the etree internals in detail.

Add a function to ElementTree that returns the tag using the namespace prefix 
(eg. treenode.tagpre). Namespaces and prefixes are cached and used to expand 
the prefix only when absolutely required. Some XML/xpath search operations 
currently assume the full expanded namespaces not prefixes which may lead to 
side-effects.
You can leave the default behaviour for compatibility.
Using prefixes in the tree storage and searches would reduce memory and CPU 
time (when no expansion is required).

----------
nosy: +Tim Chambers

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue18304>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to