File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,8 +123,22 @@ \section{\module{HTMLParser} ---
123123by a derived class; the base class implementation does nothing.
124124\end {methoddesc }
125125
126+ \begin {methoddesc }{handle_pi}{data}
127+ Method called when a processing instruction is encountered. The
128+ \var {data} parameter will contain the entire processing instruction.
129+ For example, for the processing instruction \code {<?proc color='red'>},
130+ this method would be called as \code {handle_pi("proc color='red'")}. It
131+ is intended to be overridden by a derived class; the base class
132+ implementation does nothing.
133+
134+ \note {The \class {HTMLParser} class uses the SGML syntactic rules for
135+ processing instruction. An XHTML processing instruction using the
136+ trailing \character {?} will cause the \character {?} to be included in
137+ \var {data}.}
138+ \end {methoddesc }
139+
126140
127- \subsection {Example HTML Parser \label {htmlparser-example } }
141+ \subsection {Example HTML Parser Application \label {htmlparser-example } }
128142
129143As a basic example, below is a very basic HTML parser that uses the
130144\class {HTMLParser} class to print out tags as they are encountered:
You can’t perform that action at this time.
0 commit comments