MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / dump

Function dump

tools/python-3.11.9-amd64/Lib/xml/etree/ElementTree.py:1136–1152  ·  view source on GitHub ↗

Write element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file.

(elem)

Source from the content-addressed store, hash-verified

1134
1135
1136def dump(elem):
1137 """Write element tree or element structure to sys.stdout.
1138
1139 This function should be used for debugging only.
1140
1141 *elem* is either an ElementTree, or a single Element. The exact output
1142 format is implementation dependent. In this version, it's written as an
1143 ordinary XML file.
1144
1145 """
1146 # debugging
1147 if not isinstance(elem, ElementTree):
1148 elem = ElementTree(elem)
1149 elem.write(sys.stdout, encoding="unicode")
1150 tail = elem.getroot().tail
1151 if not tail or tail[-1] != "\n":
1152 sys.stdout.write("\n")
1153
1154
1155def indent(tree, space=" ", level=0):

Callers 3

dumpsMethod · 0.50
dump_arrayMethod · 0.50
dump_structMethod · 0.50

Calls 3

writeMethod · 0.95
getrootMethod · 0.95
ElementTreeClass · 0.85

Tested by

no test coverage detected