def run_edit_script(self):
for action, location, properties in self.edit_script:<EOL><INDENT>if action == '<STR_LIT>':<EOL><INDENT>node = get_location(self.dom, location)<EOL>self.action_delete(node)<EOL><DEDENT>elif action == '<STR_LIT>':<EOL><INDENT>parent = get_location(self.dom, location[:-<NUM_LIT:1>])<EOL>child_index = location[-<NUM_LIT:1>]<EOL>self.action_insert(parent, child_index, **properties)<EOL><DEDENT><DEDENT>return self.dom<EOL>
Run an xml edit script, and return the new html produced.