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

Method parse

Lib/test/test_pulldom.py:242–260  ·  view source on GitHub ↗
(self, _)

Source from the content-addressed store, hash-verified

240 self._handler = handler
241
242 def parse(self, _):
243 h = self._handler
244 h.startDocument()
245
246 # The next two items ensure that items preceding the first
247 # start_element are properly stored and emitted:
248 h.comment("a comment")
249 h.processingInstruction("target", "data")
250
251 h.startElement("html", AttributesImpl({}))
252
253 h.comment("a comment")
254 h.processingInstruction("target", "data")
255
256 h.startElement("p", AttributesImpl({"class": "paraclass"}))
257 h.characters("text")
258 h.endElement("p")
259 h.endElement("html")
260 h.endDocument()
261
262 def stub(self, *args, **kwargs):
263 """Stub method. Does nothing."""

Callers 2

test_parseMethod · 0.45
test_thorough_parseMethod · 0.45

Calls 8

AttributesImplClass · 0.90
startDocumentMethod · 0.45
commentMethod · 0.45
processingInstructionMethod · 0.45
startElementMethod · 0.45
charactersMethod · 0.45
endElementMethod · 0.45
endDocumentMethod · 0.45

Tested by

no test coverage detected