wx.html.HtmlTag

Inheritance diagram for wx.html.HtmlTag:



Description

This class represents a single HTML tag.

Derived From

Properties Summary

Class API

Methods

__init__()
No docstrings available for this method.

GetAllParams()

Returns a string containing all parameters.

Example:

tag contains <FONT SIZE=+2 COLOR=\"#000000\">.

Call to tag.GetAllParams() would return SIZE=+2 COLOR=\"#000000\".


Returns:

string


GetBeginPos()

Returns beginning position of the text between this tag and paired ending tag.


Returns:

int


GetEndPos1()

Returns ending position of the text between this tag and paired ending tag.


Returns:

int


GetEndPos2()

Returns ending position 2 of the text between this tag and paired ending tag.


Returns:

int


GetName()

Returns tag’s name.

The name is always in uppercase and it doesn’t contain ‘<’ or ‘/’ characters. (So the name of <FONT SIZE=+2> tag is “FONT” and name of </table> is “TABLE”)


Returns:

string


GetParam(par, with_commas=False)

Returns the value of the parameter.

You should check whether the parameter exists or not (use HasParam) first.

Parameters:

  • par (string): The parameter’s name.
  • with_commas (bool): True if you want to get commas as well.

Returns:

string


HasEnding()

Returns True if this tag is paired with ending tag, False otherwise.


Returns:

bool


HasParam(par)

Returns True if the tag has a parameter of the given name.

Parameters:

  • par (string): the parameter you’re looking for.

Returns:

bool


Properties

AllParams
See GetAllParams
BeginPos
See GetBeginPos
EndPos1
See GetEndPos1
EndPos2
See GetEndPos2
Name
See GetName