protected void writeAttribute(mxCodec enc,Object obj,String attr,Object value,Node node){
  value=convertValueToXml(value);
  if (isPrimitiveValue(value)) {
    writePrimitiveAttribute(enc,obj,attr,value,node);
  }
 else {
    writeComplexAttribute(enc,obj,attr,value,node);
  }
}

protected void writeAttribute ( mxCodec enc , Object obj , String attr , Object value , Node node ) { value = convertValueToXml ( value ) ; if ( isPrimitiveValue ( value ) ) { writePrimitiveAttribute ( enc , obj , attr , value , node ) ; } else { writeComplexAttribute ( enc , obj , attr , value , node ) ; } }
writes the given value into node using writeprimitiveattribute or writecomplexattribute depending on the type of the value .
