@classmethod
    def __parse_element(cls, element, this_node):

        this_node.name = element.nodeName

        # add element attributes as attributes to this node
        for i in range(element.attributes.length):
            an = element.attributes.item(i)
            this_node[an.name] = an.nodeValue

        for a in element.childNodes:
            if a.nodeType == xml.dom.Node.ELEMENT_NODE:

                child = XMLNode()
                # Ugly fix for an ugly bug. If an XML element <name />
                # exists, it now overwrites the 'name' attribute
                # storing the XML element name.
                if not hasattr(this_node, a.nodeName) or a.nodeName == 'name':
                    setattr(this_node, a.nodeName, [])

                # add the child node as an attrib to this node
                children = getattr(this_node, a.nodeName)
                children.append(child)

                cls.__parse_element(a, child)

            elif a.nodeType == xml.dom.Node.TEXT_NODE:
                this_node.text += a.nodeValue

        return this_node
Return all the Salt-usual double-under data structures for a minion
dataset/ETHPy150Open onitu/onitu/drivers/flickr/onitu_flickr/flickrapi/xmlnode.py/XMLNode.__parse_element--crossover with--dataset/ETHPy150Open saltstack/salt/tests/saltsh.py/get_salt_vars