Python xml.etree.cElementTree.TreeBuilder() Examples

The following are 5 code examples of xml.etree.cElementTree.TreeBuilder(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module xml.etree.cElementTree , or try the search function .
Example #1
Source File: test_xml_etree_c.py    From medicare-demo with Apache License 2.0 5 votes vote down vote up
def bug_1534630():
    """
    >>> bob = ET.TreeBuilder()
    >>> e = bob.data("data")
    >>> e = bob.start("tag", {})
    >>> e = bob.end("tag")
    >>> e = bob.close()
    >>> serialize(ET, e)
    '<tag />'
    """ 
Example #2
Source File: test_xml_etree_c.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
def bug_1534630():
    """
    >>> bob = ET.TreeBuilder()
    >>> e = bob.data("data")
    >>> e = bob.start("tag", {})
    >>> e = bob.end("tag")
    >>> e = bob.close()
    >>> serialize(ET, e)
    '<tag />'
    """ 
Example #3
Source File: process_local_docs.py    From gimp-plugin-export-layers with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self):
    HTMLParser.HTMLParser.__init__(self)
    self.tree_builder = ElementTree.TreeBuilder()
    self.tree = None 
Example #4
Source File: __init__.py    From zim-desktop-wiki with GNU General Public License v2.0 5 votes vote down vote up
def __init__(self, partial=False, _parsetree_roundtrip=False):
		self.partial = partial
		self._b = ElementTreeModule.TreeBuilder()
		self.stack = [] #: keeps track of current open elements
		self._last_char = None
		self._parsetree_roundtrip = _parsetree_roundtrip 
Example #5
Source File: test_xml_etree_c.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
def bug_1534630():
    """
    >>> bob = ET.TreeBuilder()
    >>> e = bob.data("data")
    >>> e = bob.start("tag", {})
    >>> e = bob.end("tag")
    >>> e = bob.close()
    >>> serialize(ET, e)
    '<tag />'
    """