html.parser.HTMLParser.handle_pi()

HTMLParser.handle_pi(data)

Method called when a processing instruction is encountered. The data parameter will contain the entire processing instruction. For example, for the processing instruction <?proc color='red'>, this method would be called as handle_pi("proc color='red'"). It is intended to be overridden by a derived class; the base class implementation does nothing.

Note

The HTMLParser class uses the SGML syntactic rules for processing instructions. An XHTML processing instruction using the trailing '?' will cause the '?' to be included in data.

doc_python
2016-10-07 17:33:48
Comments
Leave a Comment

Please login to continue.