Project

General

Profile

« Previous | Next » 

Revision 457

xml_func.py: Expand XML funcs in XML func args

View differences:

lib/xml_func.py
91 91
    '_name': name, '_namePart': name_part}
92 92

  
93 93
def process(node, on_error=exc.raise_):
94
    for child in xml_dom.NodeElemIter(node): process(child, on_error)
94 95
    name = node.tagName
95 96
    if name.startswith('_') and name in funcs:
96 97
        try: value = funcs[name](xml_dom.NodeTextEntryIter(node))
......
100 101
            xml_dom.replace(node, node.ownerDocument.createComment('\n'+str_))
101 102
            on_error(e)
102 103
        else: xml_dom.replace_with_text(node, value)
103
    else:
104
        for child in xml_dom.NodeElemIter(node): process(child, on_error)

Also available in: Unified diff