MCPcopy Create free account
hub / github.com/clips/pattern / handle_pi

Method handle_pi

pattern/web/soup/BeautifulSoup.py:1383–1389  ·  view source on GitHub ↗

Handle a processing instruction as a ProcessingInstruction object, possibly one with a %SOUP-ENCODING% slot into which an encoding will be plugged later.

(self, text)

Source from the content-addressed store, hash-verified

1381 self.endData(subclass)
1382
1383 def handle_pi(self, text):
1384 """Handle a processing instruction as a ProcessingInstruction
1385 object, possibly one with a %SOUP-ENCODING% slot into which an
1386 encoding will be plugged later."""
1387 if text[:3] == "xml":
1388 text = u"xml version='1.0' encoding='%SOUP-ENCODING%'"
1389 self._toStringSubclass(text, ProcessingInstruction)
1390
1391 def handle_comment(self, text):
1392 "Handle comments as Comment objects."

Callers

nothing calls this directly

Calls 1

_toStringSubclassMethod · 0.95

Tested by

no test coverage detected