class documentation
class HTMLTreeBuilder(TreeBuilder): (source)
Known subclasses: bs4.builder._html5lib.HTML5TreeBuilder
, bs4.builder._htmlparser.HTMLParserTreeBuilder
, bs4.builder._lxml.LXMLTreeBuilder
This TreeBuilder knows facts about HTML. Such as which tags are empty-element tags.
Method | set |
Replace the declared encoding in a <meta> tag with a placeholder, to be substituted when the tag is output to a string. |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | DEFAULT |
Undocumented |
Class Variable | block |
Undocumented |
Class Variable | empty |
Undocumented |
Inherited from TreeBuilder
:
Method | __init__ |
Constructor. |
Method | can |
Might a tag with this name be an empty-element tag? |
Method | feed |
Run some incoming markup through some parsing process, populating the `BeautifulSoup` object in self.soup. |
Method | initialize |
The BeautifulSoup object has been initialized and is now being associated with the TreeBuilder. |
Method | prepare |
Run any preliminary steps necessary to make incoming markup acceptable to the parser. |
Method | reset |
Do any work necessary to reset the underlying parser for a new document. |
Method | test |
Wrap an HTML fragment to make it look like a document. |
Constant | ALTERNATE |
Undocumented |
Constant | NAME |
Undocumented |
Constant | TRACKS |
Undocumented |
Constant | USE |
Undocumented |
Class Variable | features |
Undocumented |
Class Variable | is |
Undocumented |
Class Variable | picklable |
Undocumented |
Instance Variable | cdata |
Undocumented |
Instance Variable | preserve |
Undocumented |
Instance Variable | soup |
Undocumented |
Instance Variable | store |
Undocumented |
Instance Variable | string |
Undocumented |
Method | _replace |
When an attribute value is associated with a tag that can have multiple values for that attribute, convert the string value to a list of strings. |
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. :param tag: A `Tag` :return: Whether or not a substitution was performed.
Undocumented
Value |
|
Undocumented
Value |
|