public static void GetXMLStringFromNode(ref string xmlStr, XmlNode node) { unsafe { var str = XmlSDK.RapidXmlNodeA_GetStringFromNode(node.CoreObject); xmlStr = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(str); XmlSDK.RapidXmlNodeA_FreeString(str); } }