Print out the source code of a xml node
(node, s=None)
| 5 | |
| 6 | |
| 7 | def transform_node_to_src(node, s=None): |
| 8 | """Print out the source code of a xml node""" |
| 9 | if s is None: |
| 10 | s = "" |
| 11 | if node.text: |
| 12 | s += node.text |
| 13 | for child in node: |
| 14 | s = transform_node_to_src(child, s) |
| 15 | if node.tail: |
| 16 | s += node.tail |
| 17 | return s |
| 18 | |
| 19 | |
| 20 | def remove_edges_of_node(G, n, in_edges=True, out_edges=True): |