MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _toprettyxml_node

Function _toprettyxml_node

thirdparty/prettyprint/prettyprint.py:81–95  ·  view source on GitHub ↗
(self, indent="\t", newl="\n", encoding = None)

Source from the content-addressed store, hash-verified

79 writer.write("/>%s"%(newl))
80
81def _toprettyxml_node(self, indent="\t", newl="\n", encoding = None):
82 _collapse(self)
83 # indent = the indentation string to prepend, per level
84 # newl = the newline string to append
85 writer = minidom._get_StringIO()
86 if encoding is not None:
87 import codecs
88 # Can't use codecs.getwriter to preserve 2.0 compatibility
89 writer = codecs.lookup(encoding)[3](writer)
90 if self.nodeType == Node.DOCUMENT_NODE:
91 # Can pass encoding only to document, to put it into XML header
92 self.writexml(writer, "", indent, newl, encoding)
93 else:
94 self.writexml(writer, "", indent, newl)
95 return writer.getvalue()
96
97_patch_minidom()

Callers

nothing calls this directly

Calls 2

_collapseFunction · 0.85
lookupMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…