]> granicus.if.org Git - python/commitdiff
Added documentation for the handle_pi() method, based on SF patch #662464.
authorFred Drake <fdrake@acm.org>
Thu, 17 Apr 2003 22:36:52 +0000 (22:36 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 17 Apr 2003 22:36:52 +0000 (22:36 +0000)
Closes SF bug #659188, patch #662464.

Doc/lib/libhtmlparser.tex

index 68c93e015e86a5b503d2f88afb982ae272445560..f7bbf63734bf736fee56f33815ea91055cb10d4e 100644 (file)
@@ -123,8 +123,22 @@ inside the \code{<!}...\code{>} markup.It is intended to be overridden
 by a derived class; the base class implementation does nothing.
 \end{methoddesc}
 
+\begin{methoddesc}{handle_pi}{data}
+Method called when a processing instruction is encountered.  The
+\var{data} parameter will contain the entire processing instruction.
+For example, for the processing instruction \code{<?proc color='red'>},
+this method would be called as \code{handle_pi("proc color='red'")}.  It
+is intended to be overridden by a derived class; the base class
+implementation does nothing.
+
+\note{The \class{HTMLParser} class uses the SGML syntactic rules for
+processing instruction.  An XHTML processing instruction using the
+trailing \character{?} will cause the \character{?} to be included in
+\var{data}.}
+\end{methoddesc}
+
 
-\subsection{Example HTML Parser \label{htmlparser-example}}
+\subsection{Example HTML Parser Application \label{htmlparser-example}}
 
 As a basic example, below is a very basic HTML parser that uses the
 \class{HTMLParser} class to print out tags as they are encountered: