Revision 796
Added by Aaron Marcuse-Kubitza about 13 years ago
lib/xml_dom.py | ||
---|---|---|
196 | 196 |
|
197 | 197 |
minidom.Node.__iter__ = lambda self: NodeIter(self) |
198 | 198 |
|
199 |
minidom.Node.__str__ = lambda self: self.toprettyxml(**toprettyxml_config) |
|
199 |
def __Node_str(self): return self.toprettyxml(**toprettyxml_config) |
|
200 |
minidom.Node.__str__ = __Node_str |
|
201 |
minidom.Node.__repr__ = __Node_str |
|
202 |
minidom.Element.__repr__ = __Node_str |
|
200 | 203 |
|
201 | 204 |
minidom.Node.pop = lambda self: self.removeChild(self.lastChild) |
202 | 205 |
|
Also available in: Unified diff
xml_dom.py: Override Node.__repr__ and Element.__repr__ to make sure self.toprettyxml() is used in all cases where a Node is converted to a string