MCPcopy Index your code
hub / github.com/python/cpython / xml_str

Function xml_str

Lib/test/test_sax.py:107–110  ·  view source on GitHub ↗
(doc, encoding=None)

Source from the content-addressed store, hash-verified

105
106
107def xml_str(doc, encoding=None):
108 if encoding is None:
109 return doc
110 return '<?xml version="1.0" encoding="%s"?>\n%s' % (encoding, doc)
111
112def xml_bytes(doc, encoding, decl_encoding=...):
113 if decl_encoding is ...:

Callers 6

xml_bytesFunction · 0.85
make_xml_fileFunction · 0.85
check_parseMethod · 0.85
test_parse_textMethod · 0.85
check_parseStringMethod · 0.85
test_parseString_textMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…