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

Function xml_bytes

Lib/test/test_sax.py:112–115  ·  view source on GitHub ↗
(doc, encoding, decl_encoding=...)

Source from the content-addressed store, hash-verified

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 ...:
114 decl_encoding = encoding
115 return xml_str(doc, decl_encoding).encode(encoding, 'xmlcharrefreplace')
116
117def make_xml_file(doc, encoding, decl_encoding=...):
118 if decl_encoding is ...:

Callers 2

test_parse_bytesMethod · 0.85

Calls 2

xml_strFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…