Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XmlLite CDATA limit

From: Raistlin@-----------.---------.---
To: NULL
Date: 5/27/2009 2:39:00 AM
Hi,

I would just like to ask for some help.  I have a single XML that 275MB in 
size.  One CDATA section is 180MB in size.  I thought IXmlReader::GetValue 
can handle this just fine since it's still way below 4GB. I derived the 4GB 
limit from the documentation on XmlLite regarding capacities.

The problem is, when I call GetValue on the 180MB CDATA, it throws an 
exception and I'm not sure how to catch it.

What I'm doing is:
1. Call IXmlReader::GetValue using temp buffer to hold the return (const 
WCHAR*) and a variable (templength) to get the CDATA size.
2. Initialize actual buffer to hold data (WCHAR* data = new WCHAR[templength])
3. copy to data fro the temp buffer to the actual buffer (lstrcpy)

on smaller-sized XMLs the routine works fine.  And the offending CDATA is 
actually the second in a sequence of 3.

I'm reading it from a file because I fail to create a buffer that's big 
enough to hold the data (GlobalAlloc fails with "not enough storage is 
available to complete this operation")

Is there an alternative way of doing this?  I appreciate any guidance you 
can give me.  Thanks in advance.


BTW, I determined the size of the offending CDATA's size by opening the XML 
file and deleting everything except the CDATA itself and saving it to a text 
file.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent