Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30b6e82

Browse files
committed
Added documentation for the handle_pi() method, based on SF patch #662464.
Closes SF bug #659188, patch #662464.
1 parent 816653f commit 30b6e82

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

Doc/lib/libhtmlparser.tex

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,22 @@ \section{\module{HTMLParser} ---
123123
by 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
129143
As 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:

0 commit comments

Comments
 (0)