Message305405
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). |
|
Date |
User |
Action |
Args |
2017-11-02 08:33:31 | Tim Chambers | set | recipients:
+ Tim Chambers, rhettinger, scoder, eli.bendersky, martin.panter, brycenesbitt, pocek, jjmiller50 |
2017-11-02 08:33:30 | Tim Chambers | set | messageid: <1509611610.98.0.213398074469.issue18304@psf.upfronthosting.co.za> |
2017-11-02 08:33:30 | Tim Chambers | link | issue18304 messages |
2017-11-02 08:33:30 | Tim Chambers | create | |
|