src/main/java/com/mxgraph/io/mxCodec.java
protected void addElement(Node node)
	{
		if (node instanceof Element)
		{
			String id = ((Element) node).getAttribute("id");
			
			if (id != null && !elements.containsKey(id))
			{
				elements.put(id,  node);
			}
		}
		
		node = node.getFirstChild();
		
		while (node != null)
		{
			addElement(node);
			node = node.getNextSibling();
		}
	}
/**
	 * Adds the given element to <elements> if it has an ID.
	 */
Adds the given element to  if it has an ID.
Adds the given element to if it has an ID .
protected void addElement(Node node)
	{
		if (node instanceof Element)
		{
			String id = ((Element) node).getAttribute("id");
			if (id != null && !elements.containsKey(id))
			{
				elements.put(id,  node);
			}
		}
		node = node.getFirstChild();
		while (node != null)
		{
			addElement(node);
			node = node.getNextSibling();
		}
	}
protected void addElement ( Node node ) { if ( node instanceof Element ) { String id = ( ( Element ) node ) . getAttribute ( "id" ) ; if ( id != null && ! elements . containsKey ( id ) ) { elements . put ( id , node ) ; } } node = node . getFirstChild ( ) ; while ( node != null ) { addElement ( node ) ; node = node . getNextSibling ( ) ; } }
Adds the given element to <elements> if it has an ID.
Adds the given element to <elements > if it has an ID .