Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
bs4.builder.HTMLTreeBuilder Class Reference
Inheritance diagram for bs4.builder.HTMLTreeBuilder:
Inheritance graph
[legend]
Collaboration diagram for bs4.builder.HTMLTreeBuilder:
Collaboration graph
[legend]

Public Member Functions

bool set_up_substitutions (self, Tag tag)
 
- Public Member Functions inherited from bs4.builder.TreeBuilder
 __init__ (self, Dict[str, Set[str]] multi_valued_attributes=USE_DEFAULT, Set[str] preserve_whitespace_tags=USE_DEFAULT, bool store_line_numbers=USE_DEFAULT, Dict[str, Type[NavigableString]] string_containers=USE_DEFAULT, Set[str] empty_element_tags=USE_DEFAULT, Type[AttributeDict] attribute_dict_class=AttributeDict, Type[AttributeValueList] attribute_value_list_class=AttributeValueList)
 
None initialize_soup (self, BeautifulSoup soup)
 
None reset (self)
 
bool can_be_empty_element (self, str tag_name)
 
None feed (self, _RawMarkup markup)
 
Iterable[Tuple[_RawMarkup, Optional[_Encoding], Optional[_Encoding], bool]] prepare_markup (self, _RawMarkup markup, Optional[_Encoding] user_specified_encoding=None, Optional[_Encoding] document_declared_encoding=None, Optional[_Encodings] exclude_encodings=None)
 
str test_fragment_to_document (self, str fragment)
 

Static Public Attributes

Optional DEFAULT_EMPTY_ELEMENT_TAGS
 
Set DEFAULT_BLOCK_ELEMENTS
 
dict DEFAULT_STRING_CONTAINERS
 
dict DEFAULT_CDATA_LIST_ATTRIBUTES
 
set DEFAULT_PRESERVE_WHITESPACE_TAGS = set(["pre", "textarea"])
 
- Static Public Attributes inherited from bs4.builder.TreeBuilder
Any USE_DEFAULT = object()
 
str NAME = "[Unknown tree builder]"
 
list ALTERNATE_NAMES = []
 
list features = []
 
bool is_xml = False
 
bool picklable = False
 
Optional soup [BeautifulSoup]
 
Optional empty_element_tags = None
 
Dict cdata_list_attributes [str, Set[str]]
 
Set preserve_whitespace_tags [str]
 
Dict string_containers [str, Type[NavigableString]]
 
bool tracks_line_numbers
 
Dict DEFAULT_CDATA_LIST_ATTRIBUTES = defaultdict(set)
 
Set DEFAULT_PRESERVE_WHITESPACE_TAGS = set()
 
dict DEFAULT_STRING_CONTAINERS = {}
 
Optional DEFAULT_EMPTY_ELEMENT_TAGS = None
 
bool TRACKS_LINE_NUMBERS = False
 

Additional Inherited Members

- Public Attributes inherited from bs4.builder.TreeBuilder
 soup
 
 cdata_list_attributes
 
 preserve_whitespace_tags
 
 empty_element_tags
 
 store_line_numbers
 
 string_containers
 
 attribute_dict_class
 
 attribute_value_list_class
 
- Protected Member Functions inherited from bs4.builder.TreeBuilder
_AttributeValues _replace_cdata_list_attribute_values (self, str tag_name, _RawOrProcessedAttributeValues attrs)
 

Detailed Description

This TreeBuilder knows facts about HTML, such as which tags are treated
specially by the HTML standard.

Member Function Documentation

◆ set_up_substitutions()

bool bs4.builder.HTMLTreeBuilder.set_up_substitutions (   self,
Tag  tag 
)
Replace the declared encoding in a <meta> tag with a placeholder,
to be substituted when the tag is output to a string.

An HTML document may come in to Beautiful Soup as one
encoding, but exit in a different encoding, and the <meta> tag
needs to be changed to reflect this.

:return: Whether or not a substitution was performed.

:meta private:

Reimplemented from bs4.builder.TreeBuilder.

Member Data Documentation

◆ DEFAULT_CDATA_LIST_ATTRIBUTES

dict bs4.builder.HTMLTreeBuilder.DEFAULT_CDATA_LIST_ATTRIBUTES
static
Initial value:
= {
"*": {"class", "accesskey", "dropzone"},
"a": {"rel", "rev"},
"link": {"rel", "rev"},
"td": {"headers"},
"th": {"headers"},
"form": {"accept-charset"},
"object": {"archive"},
# These are HTML5 specific, as are *.accesskey and *.dropzone above.
"area": {"rel"},
"icon": {"sizes"},
"iframe": {"sandbox"},
"output": {"for"},
}

◆ DEFAULT_EMPTY_ELEMENT_TAGS

Optional bs4.builder.HTMLTreeBuilder.DEFAULT_EMPTY_ELEMENT_TAGS
static
Initial value:
= set(
[
# These are from HTML5.
"area",
"base",
"br",
"col",
"embed",
"hr",
"img",
"input",
"keygen",
"link",
"menuitem",
"meta",
"param",
"source",
"track",
"wbr",
# These are from earlier versions of HTML and are removed in HTML5.
"basefont",
"bgsound",
"command",
"frame",
"image",
"isindex",
"nextid",
"spacer",
]
)

◆ DEFAULT_STRING_CONTAINERS

dict bs4.builder.HTMLTreeBuilder.DEFAULT_STRING_CONTAINERS
static
Initial value:
= { # type:ignore
"rt": RubyTextString,
"rp": RubyParenthesisString,
"style": Stylesheet,
"script": Script,
"template": TemplateString,
}

The documentation for this class was generated from the following file: