src/main/java/com/mxgraph/io/mxObjectCodec.java
public Object decode(mxCodec dec, Node node, Object into)
	{
		Object obj = null;

		if (node instanceof Element)
		{
			String id = ((Element) node).getAttribute("id");
			obj = dec.objects.get(id);

			if (obj == null)
			{
				obj = into;

				if (obj == null)
				{
					obj = cloneTemplate(node);
				}

				if (id != null && id.length() > 0)
				{
					dec.putObject(id, obj);
				}
			}

			node = beforeDecode(dec, node, obj);
			decodeNode(dec, node, obj);
			obj = afterDecode(dec, node, obj);
		}

		return obj;
	}
/**
	 * Parses the given node into the object or returns a new object
	 * representing the given node.
	 * 
	 * Dec is a reference to the calling decoder. It is used to decode complex
	 * objects and resolve references.
	 * 
	 * If a node has an id attribute then the object cache is checked for the
	 * object. If the object is not yet in the cache then it is constructed
	 * using the constructor of <template> and cached in <mxCodec.objects>.
	 * 
	 * This implementation decodes all attributes and childs of a node according
	 * to the following rules:
	 *  - If the variable name is in <exclude> or if the attribute name is "id"
	 * or "as" then it is ignored. - If the variable name is in <idrefs> then
	 * <mxCodec.getObject> is used to replace the reference with an object. -
	 * The variable name is mapped using a reverse <mapping>. - If the value has
	 * a child node, then the codec is used to create a child object with the
	 * variable name taken from the "as" attribute. - If the object is an array
	 * and the variable name is empty then the value or child object is appended
	 * to the array. - If an add child has no value or the object is not an
	 * array then the child text content is evaluated using <mxUtils.eval>.
	 * 
	 * If no object exists for an ID in <idrefs> a warning is issued in
	 * System.err.
	 * 
	 * @param dec Codec that controls the encoding process.
	 * @param node XML node to be decoded.
	 * @param into Optional object to encode the node into.
	 * @return Returns the resulting object that represents the given XML node
	 * or the object given to the method as the into parameter.
	 */
Parses the given node into the object or returns a new object
representing the given node.

Dec is a reference to the calling decoder. It is used to decode complex
objects and resolve references.

If a node has an id attribute then the object cache is checked for the
object. If the object is not yet in the cache then it is constructed
using the constructor of 

This implementation decodes all attributes and childs of a node according
to the following rules:
- If the variable name is in  or if the attribute name is "id"
or "as" then it is ignored. - If the variable name is in  then
 is used to replace the reference with an object.
The variable name is mapped using a reverse . - If the value has
a child node, then the codec is used to create a child object with the
variable name taken from the "as" attribute. - If the object is an array
and the variable name is empty then the value or child object is appended
to the array. - If an add child has no value or the object is not an
array then the child text content is evaluated using .

If no object exists for an ID in  a warning is issued in
System.err.

@param dec Codec that controls the encoding process.
@param node XML node to be decoded.
@param into Optional object to encode the node into.
@return Returns the resulting object that represents the given XML node
or the object given to the method as the into parameter.
Parses the given node into the object or returns a new object representing the given node . Dec is a reference to the calling decoder . It is used to decode complex objects and resolve references . If a node has an id attribute then the object cache is checked for the object . If the object is not yet in the cache then it is constructed using the constructor of This implementation decodes all attributes and childs of a node according to the following rules : - If the variable name is in or if the attribute name is " id " or " as " then it is ignored . - If the variable name is in then is used to replace the reference with an object . The variable name is mapped using a reverse . - If the value has a child node then the codec is used to create a child object with the variable name taken from the " as " attribute . - If the object is an array and the variable name is empty then the value or child object is appended to the array . - If an add child has no value or the object is not an array then the child text content is evaluated using . If no object exists for an ID in a warning is issued in System . err . @param dec Codec that controls the encoding process . @param node XML node to be decoded . @param into Optional object to encode the node into . @return Returns the resulting object that represents the given XML node or the object given to the method as the into parameter .
public Object decode(mxCodec dec, Node node, Object into)
	{
		Object obj = null;
		if (node instanceof Element)
		{
			String id = ((Element) node).getAttribute("id");
			obj = dec.objects.get(id);
			if (obj == null)
			{
				obj = into;
				if (obj == null)
				{
					obj = cloneTemplate(node);
				}
				if (id != null && id.length() > 0)
				{
					dec.putObject(id, obj);
				}
			}
			node = beforeDecode(dec, node, obj);
			decodeNode(dec, node, obj);
			obj = afterDecode(dec, node, obj);
		}
		return obj;
	}
public Object decode ( mxCodec dec , Node node , Object into ) { Object obj = null ; if ( node instanceof Element ) { String id = ( ( Element ) node ) . getAttribute ( "id" ) ; obj = dec . objects . get ( id ) ; if ( obj == null ) { obj = into ; if ( obj == null ) { obj = cloneTemplate ( node ) ; } if ( id != null && id . length ( ) > 0 ) { dec . putObject ( id , obj ) ; } } node = beforeDecode ( dec , node , obj ) ; decodeNode ( dec , node , obj ) ; obj = afterDecode ( dec , node , obj ) ; } return obj ; }
Parses the given node into the object or returns a new object
 representing the given node.
Parses the given node into the object or returns a new object representing the given node .