Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="srcMLBuff"></param>
 /// <param name="xsltFile"></param>
 /// <returns></returns>
 public string ApplyXsltToSrcMLString(string srcMLBuff, string xsltFile)
 {
     //Function sould take a srcML buffer string and then pass it into C++ to apply xsltFile to it.
     //C++ will return buffer with transformed srcML
     if (File.Exists(xsltFile))
     {
         IntPtr buff   = LibSrcMLRunner.SrcMLApplyXsltMtM(Marshal.StringToHGlobalAnsi(srcMLBuff), Marshal.StringToHGlobalAnsi(xsltFile));
         IntPtr docptr = Marshal.ReadIntPtr(buff);
         string docstr = Marshal.PtrToStringAnsi(docptr);
         return(docstr);
     }
     return(null);
 }