|
|
|
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:
-
- 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
Initial value:00001 [
00002
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 _escape = re.compile(r"[&<>\"\x80-\xff]+") |
| PI = ProcessingInstruction |
| | |