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

Method parseString

Lib/xml/dom/expatbuilder.py:216–227  ·  view source on GitHub ↗

Parse a document from a string, returning the document node.

(self, string)

Source from the content-addressed store, hash-verified

214 return doc
215
216 def parseString(self, string):
217 """Parse a document from a string, returning the document node."""
218 parser = self.getParser()
219 try:
220 parser.Parse(string, True)
221 self._setup_subset(string)
222 except ParseEscape:
223 pass
224 doc = self.document
225 self.reset()
226 self._parser = None
227 return doc
228
229 def _setup_subset(self, buffer):
230 """Load the internal subset if there might be one."""

Callers 10

parseStringFunction · 0.95
minidom-example.pyFile · 0.45
test_parse_semanticsMethod · 0.45
test_expandItemMethod · 0.45
test_commentMethod · 0.45
test_end_documentMethod · 0.45
parseStringFunction · 0.45
parseStringMethod · 0.45

Calls 3

getParserMethod · 0.95
_setup_subsetMethod · 0.95
resetMethod · 0.95

Tested by 6

test_parse_semanticsMethod · 0.36
test_expandItemMethod · 0.36
test_commentMethod · 0.36
test_end_documentMethod · 0.36