OpenQuizz
Une application de gestion des contenus pédagogiques
|
Data Structures | |
class | HTMLParser |
class | ParseError |
Functions | |
def | parse (doc, treebuilder="etree", namespaceHTMLElements=True, **kwargs) |
def | parseFragment (doc, container="div", treebuilder="etree", namespaceHTMLElements=True, **kwargs) |
def | method_decorator_metaclass (function) |
def | getPhases (debug) |
def | adjust_attributes (token, replacements) |
def | impliedTagToken (name, type="EndTag", attributes=None, selfClosing=False) |
Variables | |
parser | |
tree | |
processSpaceCharacters | |
originalPhase | |
characterTokens | |
def pip._vendor.html5lib.html5parser.adjust_attributes | ( | token, | |
replacements | |||
) |
def pip._vendor.html5lib.html5parser.getPhases | ( | debug | ) |
def pip._vendor.html5lib.html5parser.impliedTagToken | ( | name, | |
type = "EndTag" , |
|||
attributes = None , |
|||
selfClosing = False |
|||
) |
def pip._vendor.html5lib.html5parser.method_decorator_metaclass | ( | function | ) |
def pip._vendor.html5lib.html5parser.parse | ( | doc, | |
treebuilder = "etree" , |
|||
namespaceHTMLElements = True , |
|||
** | kwargs | ||
) |
Parse an HTML document as a string or file-like object into a tree :arg doc: the document to parse as a string or file-like object :arg treebuilder: the treebuilder to use when parsing :arg namespaceHTMLElements: whether or not to namespace HTML elements :returns: parsed tree Example: >>> from html5lib.html5parser import parse >>> parse('<html><body><p>This is a doc</p></body></html>') <Element u'{http://www.w3.org/1999/xhtml}html' at 0x7feac4909db0>
def pip._vendor.html5lib.html5parser.parseFragment | ( | doc, | |
container = "div" , |
|||
treebuilder = "etree" , |
|||
namespaceHTMLElements = True , |
|||
** | kwargs | ||
) |
Parse an HTML fragment as a string or file-like object into a tree :arg doc: the fragment to parse as a string or file-like object :arg container: the container context to parse the fragment in :arg treebuilder: the treebuilder to use when parsing :arg namespaceHTMLElements: whether or not to namespace HTML elements :returns: parsed tree Example: >>> from html5lib.html5libparser import parseFragment >>> parseFragment('<b>this is a fragment</b>') <Element u'DOCUMENT_FRAGMENT' at 0x7feac484b090>
characterTokens |
originalPhase |
parser |
processSpaceCharacters |
tree |