Note that there are some explanatory texts on larger screens.

plurals
  1. POxml file size for http post - tinyxml vc++
    text
    copied!<p>Am trying to post an xml file as string to the server. Xml library is tinyxml and for posting am using CInternetsession.</p> <p>What happens is when the xml file is upto around 300 kb, Posting is working fine.</p> <p>But when the xml file size exceeds more than that, am receing "Operation timed out".</p> <p>Why this error coming ?</p> <p>Is that the problem with the size of the xml or CinternetSession posting ?</p> <p>I want to know the best resource of xml library for writing and reading and parsing large xml of about atleast 20 mb. Do we have any limitations for xml parsing</p> <pre><code> char text[7000] = {""}; SHGetSpecialFolderPath(0,xmlpth,CSIDL_APPDATA,1); TiXmlDocument docs( "C:\\XmlData.xml" ); bool loadOkays = docs.LoadFile(); if ( !loadOkays ) { } else { TiXmlPrinter printer; printer.SetIndent("\t"); docs.Accept( &amp;printer ); docs.Print(); CString URLpostdata = printer.CStr(); #define MAX_READ_BUFFER 102400 CString strHeaders =_T("Content-Type: text/xml"); CString strFormData = _T("Data=&lt;?xml version=\"1.0\" encoding=\"UTF-8\" ?&gt;&lt;xmldata&gt;"+URLpostdata+"&lt;/xmldata&gt;"); CInternetSession session; session.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT,60000); session.SetOption(INTERNET_OPTION_CONNECT_RETRIES, 60000); CHttpConnection* pConnection = session.GetHttpConnection(_T("xxx.xxx.xxx.x")); CHttpFile* pFile = pConnection-&gt;OpenRequest(CHttpConnection::HTTP_VERB_POST, _T("/WinTest/TestServlet?")); BOOL result = pFile-&gt;SendRequest(strHeaders, (LPVOID)(LPCTSTR)strFormData, strFormData.GetLength()); DWORD dwError; pFile-&gt;QueryInfoStatusCode(dwError); if(dwError==200) { AfxMessageBox("Data was successfully posted"); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload