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);
		}
	}