Pyjo.DOM.HTML - HTML/XML engine¶
import Pyjo.DOM.HTML
html = Pyjo.DOM.HTML.new()
html.parse('<div><p id="a">Test</p><p id="b">123</p></div>')
tree = html.tree
Classes¶
-
class
Pyjo.DOM.HTML.
Pyjo_DOM_HTML
(**kwargs)¶ Pyjo.DOM.HTML
inherits all attributes and methods fromPyjo.Base
and implements the following new ones.-
parse
(html)¶ html = html.parse(u'<foo bar="baz">I ♥ Pyjo!</foo>')
Parse HTML/XML fragment.
-
render
()¶ string = html.render()
Render DOM to HTML/XML.
-
tree
= None¶ tree = html.tree html.tree = ['root']
Document Object Model. Note that this structure should only be used very carefully since it is very dynamic.
-
xml
= None¶ bool = html.xml html.xml = bool
Disable HTML semantics in parser and activate case sensitivity, defaults to auto detection based on processing instructions.
-
-
Pyjo.DOM.HTML.
object
¶ alias of
Pyjo_DOM_HTML