Project

General

Profile

« Previous | Next » 

Revision 4322

xml_func.py: passthru(): Use xml_dom.prune() so that after empty children are removed, the node itself is also removed if it's empty. This enables further pruning of any node that contains the pruned node.

View differences:

xml_func.py
84 84

  
85 85
def passthru(node):
86 86
    '''Passes through single child node. First prunes the node.'''
87
    xml_dom.prune_children(node)
87
    xml_dom.prune(node)
88 88
    children = list(xml_dom.NodeEntryIter(node))
89 89
    if len(children) == 1: xml_dom.replace(node, children[0][1])
90 90

  

Also available in: Unified diff