'import graph xml tag to create a Graph Object and delegate Node/Edges extraction to Edge/Node class'

@staticmethod
def importXML(graph_xml, gexf_obj):

    type = ''
    mode = ''
    label = ''
    timeformat = 'double'
    for attr in graph_xml.attrib:
        attr = attr.lower()
        if (attr == 'defaultedgetype'):
            type = graph_xml.attrib[attr]
        if (attr == 'mode'):
            mode = graph_xml.attrib[attr]
        if (attr == 'label'):
            label = graph_xml.attrib[attr]
        if (attr == 'timeformat'):
            timeformat = graph_xml.attrib[attr]
    graph_obj = gexf_obj.addGraph(type=type, mode=mode, label=label, timeformat=timeformat)
    for child in graph_xml:
        tag = ns_clean(child.tag).lower()
        if (tag == 'attributes'):
            attributes_xml = child
            graph_obj.attributes.importAttributesXML(attributes_xml)
        if (tag == 'nodes'):
            nodes_xml = child
            Node.importXML(nodes_xml, graph_obj)
        if (tag == 'edges'):
            edges_xml = child
            Edge.importXML(edges_xml, graph_obj)
