Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
30b6e823
Commit
30b6e823
authored
Apr 17, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added documentation for the handle_pi() method, based on SF patch #662464.
Closes SF bug #659188, patch #662464.
parent
816653fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
Doc/lib/libhtmlparser.tex
Doc/lib/libhtmlparser.tex
+15
-1
No files found.
Doc/lib/libhtmlparser.tex
View file @
30b6e823
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment