Project

General

Profile

« Previous | Next » 

Revision 435

xml_dom.py: Added remove() function to remove a node

View differences:

lib/xml_dom.py
123 123
    set_value(child, value)
124 124
    node.appendChild(child)
125 125

  
126
def remove(node): node.parentNode.removeChild(node)
127

  
126 128
def replace(old_node, new_node):
127 129
    old_node.parentNode.replaceChild(new_node, old_node) # note order reversed
128 130

  

Also available in: Unified diff