Movatterモバイル変換
[0]ホーム
8.13.4 TreeBuilder Objects
| class TreeBuilder( | [element_factory]) |
- Generic element structure builder. This builder converts a sequenceof start, data, and end method calls to a well-formed element structure.You can use this class to build an element structure using a custom XMLparser, or a parser for some other XML-like format.Theelement_factory is called to create new Element instances whengiven.
- Flushes the parser buffers, and returns the toplevel documenelement.
- Returns:
- An Element instance.
- Adds text to the current element.data is a string. This should be either an 8-bit stringcontaining ASCII text, or a Unicode string.
- Closes the current element.tag is the element name.
- Returns:
- The closed element.
- Opens a new element.tag is the element name.attrs is a dictionary containing element attributes.
- Returns:
- The opened element.
Release 2.5.2, documentation updated on 21st February, 2008. SeeAbout this document... for information on suggesting changes.
[8]ページ先頭