title: Access GraphML attributes after importing as NetworkX graph
body: <p>I have a graph, stored in <code>graphml</code> format, which includes a bunch of attributes, like </p>
  
  <pre><code>&lt;key attr.name="label" attr.type="string" for="node" id="d0"/&gt;
  </code></pre>
  
  <p>and in a node</p>
  
  <pre><code>  &lt;data key="d0"&gt;this node's label&lt;/data&gt;
  </code></pre>
  
  <p>I've imported this file using <code>nx.read_graphml('mygraph.graphml')</code>. I can visualize the graph (using <code>nx.draw_networkx(imported_graph)</code>), and I can export it again (using <code>nx.write_graphml(imported_graph, 'exported.txt', encoding='utf-8', prettyprint=True)</code>), and I see that all the attributes are kept. </p>
  
  <p>I'd like to work with nodes by accessing them based on their attributes. So I check what attributes all the nodes have like so: </p>
  
  <pre><code>for i in imported_graph.__iter__():
      print(i)
      print(nx.get_node_attributes(imported_graph, i))
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>0
  {}
  1
  {}
  </code></pre>
  
  <p>and so on, so no node has any attributes? What am I doing wrong? </p>