Revision 4299
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/xml_func.py | ||
---|---|---|
114 | 114 |
else: func(node) |
115 | 115 |
# Pruning optimizations |
116 | 116 |
else: # these should not run on functions because they would remove args |
117 |
# Remove empty children |
|
118 |
for child in xml_dom.NodeElemIter(node): |
|
119 |
if xml_dom.is_empty(child): xml_dom.remove(child) |
|
117 |
prune(node) |
|
120 | 118 |
|
121 | 119 |
def process(node, on_error=exc.reraise, is_rel_func=None, db=None): |
122 | 120 |
'''Evaluates the XML functions in an XML tree. |
Also available in: Unified diff
xml_func.py: simplify(): Use new prune()