7.1.1.2.1.1.2.14. pycropml.transpiler.antlr_py.toxml module
module for generating and serializing xml and html structures
by using simple python objects.
holger krekel, holger at merlinux eu. 2009
from https://raw.githubusercontent.com/pytest-dev/py/1805da33af0fdc89d7f00dd14e3a5f567c374e13/py/_xmlgen.py
-
class pycropml.transpiler.antlr_py.toxml.HtmlTag(*args, **kwargs)[source]
Bases: Tag
-
unicode(indent=2)[source]
-
class pycropml.transpiler.antlr_py.toxml.HtmlVisitor(write, indent=0, curindent=0, shortempty=True)[source]
Bases: SimpleUnicodeVisitor
-
inline = {'a': 1, 'abbr': 1, 'acronym': 1, 'b': 1, 'basefont': 1, 'bdo': 1, 'big': 1, 'br': 1, 'cite': 1, 'code': 1, 'dfn': 1, 'em': 1, 'font': 1, 'i': 1, 'img': 1, 'input': 1, 'kbd': 1, 'label': 1, 'q': 1, 's': 1, 'samp': 1, 'select': 1, 'small': 1, 'span': 1, 'strike': 1, 'strong': 1, 'sub': 1, 'sup': 1, 'textarea': 1, 'tt': 1, 'u': 1, 'var': 1}
-
repr_attribute(attrs, name)[source]
-
single = {'area': 1, 'base': 1, 'br': 1, 'col': 1, 'frame': 1, 'hr': 1, 'img': 1, 'input': 1, 'link': 1, 'meta': 1, 'param': 1}
-
class pycropml.transpiler.antlr_py.toxml.Namespace
Bases: object
-
class pycropml.transpiler.antlr_py.toxml.NamespaceMetaclass[source]
Bases: type
-
class pycropml.transpiler.antlr_py.toxml.SimpleUnicodeVisitor(write, indent=0, curindent=0, shortempty=True)[source]
Bases: object
recursive visitor to write unicode.
-
Tag(tag)[source]
-
attributes(tag)[source]
-
getstyle(tag)[source]
return attribute list suitable for styling.
-
list(obj)[source]
-
raw(obj)[source]
-
repr_attribute(attrs, name)[source]
-
visit(node)[source]
dispatcher on node’s class/bases name.
-
class pycropml.transpiler.antlr_py.toxml.Tag(*args, **kwargs)[source]
Bases: list
-
class Attr(**kwargs)[source]
Bases: object
-
unicode(indent=2)[source]
-
class pycropml.transpiler.antlr_py.toxml.html[source]
Bases: Namespace
-
class Style(**kw)[source]
Bases: object
-
class pycropml.transpiler.antlr_py.toxml.raw(uniobj)[source]
Bases: object
just a box that can contain a unicode string that will be
included directly in the output
-
pycropml.transpiler.antlr_py.toxml.u(s)[source]
-
pycropml.transpiler.antlr_py.toxml.unicode(x, errors=None)[source]