Panda3D

- Main Page
- Packages
- Classes

- Packages
- Package Functions

Classes | Functions | Variables

# Package showbase.ElementTree

## Classes
class | _ElementInterface
| Internal element class. More...
class | _SimpleElementPath
class | ElementTree
| ElementTree wrapper class. More...
class | QName
| QName wrapper. More...
## Functions
def | Comment
| Comment element factory.
def | dump
| Writes an element tree or element structure to sys.stdout.
def | Element
| Element factory.
def | iselement
| Checks if an object appears to be a valid element object.
def | ProcessingInstruction
| PI element factory.
def | SubElement
| Subelement factory.
## Variables
list | __all__
| _Element = _ElementInterface
tuple | _escape = re.compile(r"[&<>\"\x80-\xff]+")
tuple | ElementPath = _SimpleElementPath()
| PI = ProcessingInstruction
string | VERSION = "1.2.6"

## Function Documentation

def showbase.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:

  text | A string containing the comment string.

Returns:
  An element instance, representing a comment. Element

def showbase.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:

  elem | An element tree or an individual element.

def showbase.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:

  tag | The element name.
  attrib | An optional dictionary, containing element attributes.
  **extra | Additional attributes, given as keyword arguments.

Returns:
  An element instance. Element

def showbase.ElementTree.iselement | ( |  | element | ) |

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

Parameters:

  An | element instance.

Returns:
  A true value if this is an element object. flag

def showbase.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:

  target | A string containing the PI target.
  text | A string containing the PI contents, if any.

Returns:
  An element instance, representing a PI. Element

def showbase.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:

  parent | The parent element.
  tag | The subelement name.
  attrib | An optional dictionary, containing element attributes.
  **extra | Additional attributes, given as keyword arguments.

Returns:
  An element instance. Element

## Variable Documentation

list __all__

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     ]

_Element = _ElementInterface

tuple _escape = re.compile(r"[&<>\"\x80-\xff]+")

tuple ElementPath = _SimpleElementPath()

PI = ProcessingInstruction

string VERSION = "1.2.6"

All Classes Namespaces Functions Variables Enumerations Enumerator Properties