static public string Obj2Xml(object result) { if (result == null) { return(null); } IXmlConverter converter = result as IXmlConverter; if (converter != null) { return(converter.Object2Xml()); } string rltString = MsgTransfer.Object2XmlString(result); if (!IsPrimitiveXmlType(result.GetType())) { return(rltString); } Match match = xmlTextRegex.Match(rltString); return(match.Groups[1].Value); }