'import attributes values from attvalues gexf xml tag attached to nodes or edges'

def importAttributesValuesXML(self, attClass, attvalues_xml):

    atts = []
    for attvalues in attvalues_xml:
        for child in attvalues:
            tag = ns_clean(child.tag).lower()
            if (tag == 'attvalue'):
                attvalue_xml = child
                id = ''
                value = ''
                start = ''
                startopen = False
                end = ''
                endopen = False
                for attr in attvalue_xml.attrib:
                    if (attr == 'for'):
                        id = attvalue_xml.attrib[attr]
                    if (attr == 'value'):
                        value = attvalue_xml.attrib[attr]
                    if (attr == 'start'):
                        start = attvalue_xml.attrib[attr]
                    if (attr == 'end'):
                        end = attvalue_xml.attrib[attr]
                    if (attr == 'startopen'):
                        start = attvalue_xml.attrib[attr]
                        startopen = True
                    if (attr == 'endopen'):
                        end = attvalue_xml.attrib[attr]
                        endopen = True
                atts.append(self.makeAttributeInstance(attClass, id, value, start, end, startopen, endopen))
    return atts
