Example #1
0
        public string ApplyXPathToSrcMLString(string srcMLBuff, string xPathFile)
        {
            //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
            IntPtr buff   = LibSrcMLRunner.SrcMLApplyXPathMtM(Marshal.StringToHGlobalAnsi(srcMLBuff), Marshal.StringToHGlobalAnsi(xPathFile));
            IntPtr docptr = Marshal.ReadIntPtr(buff);
            string docstr = Marshal.PtrToStringAnsi(docptr);

            return(docstr);
        }