src/main/java/com/mxgraph/io/mxObjectCodec.java
protected void writePrimitiveAttribute(mxCodec enc, Object obj,
			String attr, Object value, Node node)
	{
		if (attr == null || obj instanceof Map)
		{
			Node child = enc.document.createElement("add");

			if (attr != null)
			{
				mxCodec.setAttribute(child, "as", attr);
			}

			mxCodec.setAttribute(child, "value", value);
			node.appendChild(child);
		}
		else
		{
			mxCodec.setAttribute(node, attr, value);
		}
	}
/**
	 * Writes the given value as an attribute of the given node.
	 */
Writes the given value as an attribute of the given node.
Writes the given value as an attribute of the given node .
protected void writePrimitiveAttribute(mxCodec enc, Object obj,
			String attr, Object value, Node node)
	{
		if (attr == null || obj instanceof Map)
		{
			Node child = enc.document.createElement("add");
			if (attr != null)
			{
				mxCodec.setAttribute(child, "as", attr);
			}
			mxCodec.setAttribute(child, "value", value);
			node.appendChild(child);
		}
		else
		{
			mxCodec.setAttribute(node, attr, value);
		}
	}
protected void writePrimitiveAttribute ( mxCodec enc , Object obj , String attr , Object value , Node node ) { if ( attr == null || obj instanceof Map ) { Node child = enc . document . createElement ( "add" ) ; if ( attr != null ) { mxCodec . setAttribute ( child , "as" , attr ) ; } mxCodec . setAttribute ( child , "value" , value ) ; node . appendChild ( child ) ; } else { mxCodec . setAttribute ( node , attr , value ) ; } }
Writes the given value as an attribute of the given node.
Writes the given value as an attribute of the given node .