BigBrotherBot v1.8.0
System Development Information for the BigBrotherBot project.

b3::lib::elementtree::ElementTree Namespace Reference

Classes

class  string
class  _SimpleElementPath
class  DefaultParserAPI
class  _ElementInterface
 Internal element class. More...
class  QName
 QName wrapper. More...
class  ElementTree
 ElementTree wrapper class. More...

Functions

def Element
 Element factory.
def SubElement
 Subelement factory.
def Comment
 Comment element factory.
def ProcessingInstruction
 PI element factory.
def iselement
 Checks if an object appears to be a valid element object.
def dump
 Writes an element tree or element structure to sys.stdout.
def _encode

Variables

list __all__
 parser_api = None
string VERSION = "1.2.7"
tuple ElementPath = _SimpleElementPath()
 _Element = _ElementInterface
 PI = ProcessingInstruction
tuple _escape = re.compile(r"[&<>\"\x80-\xff]+")

Function Documentation

def b3::lib::elementtree::ElementTree::_encode (   s,
  encoding 
) [private]
def b3::lib::elementtree::ElementTree::Comment (   text = None)

Comment element factory.

This factory function creates a special element that will be serialized as an XML comment.

The comment string can be either an 8-bit ASCII string or a Unicode string.

Parameters:
textA string containing the comment string.
Returns:
An element instance, representing a comment. Element
def b3::lib::elementtree::ElementTree::dump (   elem)

Writes an element tree or element structure to sys.stdout.

This function should be used for debugging only.

The exact output format is implementation dependent. In this version, it's written as an ordinary XML file.

Parameters:
elemAn element tree or an individual element.
def b3::lib::elementtree::ElementTree::Element (   tag,
  attrib = {},
  extra 
)

Element factory.

This function returns an object implementing the standard Element interface. The exact class or type of that object is implementation dependent, but it will always be compatible with the _ElementInterface class in this module.

The element name, attribute names, and attribute values can be either 8-bit ASCII strings or Unicode strings.

Parameters:
tagThe element name.
attribAn optional dictionary, containing element attributes.
**extraAdditional attributes, given as keyword arguments.
Returns:
An element instance. Element
def b3::lib::elementtree::ElementTree::iselement (   element)

Checks if an object appears to be a valid element object.

Parameters:
Anelement instance.
Returns:
A true value if this is an element object. flag
def b3::lib::elementtree::ElementTree::ProcessingInstruction (   target,
  text = None 
)

PI element factory.

This factory function creates a special element that will be serialized as an XML processing instruction.

Parameters:
targetA string containing the PI target.
textA string containing the PI contents, if any.
Returns:
An element instance, representing a PI. Element
def b3::lib::elementtree::ElementTree::SubElement (   parent,
  tag,
  attrib = {},
  extra 
)

Subelement factory.

This function creates an element instance, and appends it to an existing element.

The element name, attribute names, and attribute values can be either 8-bit ASCII strings or Unicode strings.

Parameters:
parentThe parent element.
tagThe subelement name.
attribAn optional dictionary, containing element attributes.
**extraAdditional attributes, given as keyword arguments.
Returns:
An element instance. Element

Variable Documentation

Initial value:
00001 [
00002     # public symbols
00003     "Comment",
00004     "dump",
00005     "Element", "ElementTree",
00006     "fromstring",
00007     "iselement", "iterparse",
00008     "parse",
00009     "PI", "ProcessingInstruction",
00010     "QName",
00011     "SubElement",
00012     "tostring",
00013     "TreeBuilder",
00014     "VERSION", "XML",
00015     "XMLTreeBuilder",
00016     ]
tuple b3::lib::elementtree::ElementTree::_escape = re.compile(r"[&<>\"\x80-\xff]+")
b3::lib::elementtree::ElementTree::PI = ProcessingInstruction
 All Classes Namespaces Files Functions Variables Properties