def startElement(self, name, attrs):
        if self.first_elm:
            # Output the xml declaration prior to the first element,
            # done here instead of in startDocument to allow us to avoid
            # outputting the declaration when we try and parse non XML content
            # as can happen when we parse all files in a zip archive
            self.first_elm = False
            output('<?xml version="1.0" ?>')
        try:
            name = name.split(':')[1]
        except __HOLE__:
            pass
        # Determine if we are interested
        # in starting to record the raw
        # XML string so we can prepare
        # the feature when the feature ends
        if name in self.preparer.feat_types:
            self.buffer = []
            self.recording = True
        # Process the attributes
        tmp = '<' + name
        for (name, value) in attrs.items():
            try:
                name = name.split(':')[1]
            except IndexError:
                pass
            tmp += ' %s=%s' % (name, saxutils.quoteattr(value))
        tmp += '>'
        if self.recording:
            self.buffer.append(tmp)
        else:
            output(tmp)
        return
dataset/ETHPy150Open AstunTechnology/Loader/python/prepgml4ogr.py/gmlhandler.startElement