;ň
r!Ac @ sÇ d k l Z d k l Z d k l Z d k Z d k Z d k l Z d e f d YZ e
Z y d k Z
e Z Wn d k
Z
n Xd e
i f d YZ e p
e d j o e
i n d S(
( s Tag( s
HTMLParser( s
entitydefsN( s
ParseErrors CustomizedParserc B sŞ t Z d Z d Z d Z d Z e Z e Z e Z e Z
e Z e Z e Z
e e e e d d Z d Z d Z d Z d Z d Z d
Z d Z d Z RS(
s
This class parse the HTML, but in a customized way: it only parse
the tags and attributes specified in 'parse_tags' and 'parse_attrs',
skipping others.
NOTE: This Class tries to parse broken HTML, but it's something difficult
due the number of non-capable people doing HTML. Maybe you need to correct
the HTML using regular expressions or something like that.
One thing is to close one tag when you expect another, in this case, the
parser assumes that there is a need to close that tag and goes down through
the last opened tags, closing them until it matches the wanted tags. This
can lead to a problem when you close a tag that was not opened (in my case,
it was
!), then you need to remove this tag.
s4 Gustavo Sverzut Barbieri s $Rev: 255 $i c C s˘ t i | t d g | _ d g | _ d | _ | p d d d d d d g | _ | p
d
d d g | _ | p d
g | _ | | _
| p d g | _ d S( s8
parse_tags: a list of tag names to be parsed. Tags outside this
list will be skipped.
parse_attrs: a list of attributes to be parsed. Attributes outside
this list will be skipped.
must_close_tags: a list of tags that should be closed before other tag
start. Ie: many document doesn't close