Revision 3225
Added by Aaron Marcuse-Kubitza over 12 years ago
xml_dom.py | ||
---|---|---|
38 | 38 |
else: old.parentNode.replaceChild(new, old) # note order reversed |
39 | 39 |
|
40 | 40 |
def replace_with_text(node, new): |
41 |
''' |
|
42 |
@return The *new* node |
|
43 |
''' |
|
41 | 44 |
if util.is_str(new): new = node.ownerDocument.createTextNode(new) |
42 | 45 |
replace(node, new) |
46 |
return new |
|
43 | 47 |
|
44 | 48 |
##### Element node contents |
45 | 49 |
|
Also available in: Unified diff
xml_dom.py: replace_with_text(): Return the new node