some special charaters like while reading XML.
-
Hi all, some special extra charaters like " " are displayed while reading the xml file using CFile. i dont want that extra charaters. Code: ---- int iSz = 0; DWORD dwFileRead; int len = (int)file.GetLength(); DWORD dwOffset=0; char* ReadAsciiBuf = new char[len+1]; _TCHAR* Readbuf = new _TCHAR[len+1]; file.SeekToBegin(); dwFileRead = file.Read(ReadAsciiBuf+dwOffset,len); memset(Readbuf, 0, (file.GetLength() + 1) * sizeof(TCHAR)); iSz = Mymbstowcs(Readbuf,ReadAsciiBuf,len); strTempResult = Readbuf; file.Close(); help me out.
-
Hi all, some special extra charaters like " " are displayed while reading the xml file using CFile. i dont want that extra charaters. Code: ---- int iSz = 0; DWORD dwFileRead; int len = (int)file.GetLength(); DWORD dwOffset=0; char* ReadAsciiBuf = new char[len+1]; _TCHAR* Readbuf = new _TCHAR[len+1]; file.SeekToBegin(); dwFileRead = file.Read(ReadAsciiBuf+dwOffset,len); memset(Readbuf, 0, (file.GetLength() + 1) * sizeof(TCHAR)); iSz = Mymbstowcs(Readbuf,ReadAsciiBuf,len); strTempResult = Readbuf; file.Close(); help me out.
they're escaped characters in the XML and they're perfectly valid (http://www.w3.org/TR/1999/WD-xml-c14n-19991109.html#charescaping[^]) you're going to either have to translate them, or use an alternative xml parsing library my advice would be to use an alternative library, the effort taken to learn how to use one will be significantly less, and more rewarding, than trying to write your own, especially if you wish to consume XML generated by a third party product