A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://wxpython.org/Phoenix/docs/html/wx.html.HtmlTagHandler.html below:

wx.html.HtmlTagHandler — wxPython Phoenix 4.2.4a1 documentation

wx.html.HtmlTagHandler¶ Class Hierarchy¶

Inheritance diagram for class

HtmlTagHandler

:

Known Subclasses¶

wx.html.HtmlWinTagHandler

Methods Summary¶ Properties Summary¶ Class API¶
class wx.html.HtmlTagHandler(Object)¶

Possible constructors:


Methods¶
__init__(self)¶

Constructor.

Return type:

None


GetParser(self)¶

Returns the parser associated with this tag handler.

Return type:

wx.html.HtmlParser

Added in version 2.9.5.


GetSupportedTags(self)¶

Returns list of supported tags.

The list is in uppercase and tags are delimited by ‘,’. Example: "I,B,FONT,P"

Return type:

str


HandleTag(self, tag)¶

This is the core method of each handler.

It is called each time one of supported tags is detected. tag contains all necessary info (see wx.html.HtmlTag for details).

Example:

def HandleTag(self, tag):

    # change state of parser (e.g. set bold face)
    self.ParseInner(tag)
    # ...
    # restore original state of parser

You shouldn’t call ParseInner if the tag is not paired with an ending one.

Parameters:

tag (wx.html.HtmlTag)

Return type:

bool

Returns:

True if ParseInner was called, False otherwise.


ParseInner(self, tag)¶

This method calls parser’s wx.html.HtmlParser.DoParsing method for the string between this tag and the paired ending tag:

<A HREF="x.htm">Hello, world!</A>

In this example, a call to ParseInner (with tag pointing to A tag) will parse ‘Hello, world!’.

Parameters:

tag (wx.html.HtmlTag)

Return type:

None


ParseInnerSource(self, source)¶

Parses given source as if it was tag’s inner code (see HtmlParser.GetInnerSource).

Unlike ParseInner , this method lets you specify the source code to parse. This is useful when you need to modify the inner text before parsing.

Parameters:

source (string)

Return type:

None


SetParser(self, parser)¶

Assigns parser to this handler.

Each instance of handler is guaranteed to be called only from the one parser.

Parameters:

parser (wx.html.HtmlParser)

Return type:

None


Properties¶
Parser¶

See GetParser and SetParser


SupportedTags¶

See GetSupportedTags


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4