This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients effbot, eli.bendersky, flox, merrellb, scoder
Date 2013-05-20.13:07:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369055240.17.0.281614774145.issue7214@psf.upfronthosting.co.za>
In-reply-to
Content
TreeBuilder is an interface users can implement. As such, 'tag' is a convenience the user-defined tree builder can use, as in:


class Target(object):
    def start(self, tag, attrib):
        print('i see start', tag)
    def end(self, tag):
        print('i see end', tag)
    def close(self):
        return "DONE"

parser = ET.XMLParser(target=Target())
parser.feed("<TAG>sd</TAG>")

The default TreeBuilder simply needs to build the tree, and it doesn't actually use the tag argument (except for some sanity checking in the Python version). But user code is free to use it.
History
Date User Action Args
2013-05-20 13:07:20eli.benderskysetrecipients: + eli.bendersky, effbot, scoder, merrellb, flox
2013-05-20 13:07:20eli.benderskysetmessageid: <1369055240.17.0.281614774145.issue7214@psf.upfronthosting.co.za>
2013-05-20 13:07:20eli.benderskylinkissue7214 messages
2013-05-20 13:07:19eli.benderskycreate