Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Xerces c++ xml log

From: Boris Kolpackov <boris@-------------.--->
To: NULL
Date: 4/4/2007 7:06:00 PM

"Nuno" <nuno.esculcas@g...> writes:

> The speed is not the desired one, but i can live with this, but my
> biggest problem is that when i reach aproximilly the 22378 lines in
> the xml document when i'm doing the following instruction of code:
> LocalFileFormatTarget local(m_strLogFileFullName.c_str());
> the xerces return an xercesc::XMLException saying "Could not open
> file: ..."

This does not look like a size problem. Maybe your file is still
opened when you try to open it again?


> Is there any limit of data in an xml file?

The limit on file sizes is imposed by your hardware and/or OS.
However your approach won't allow you to write more that the
amount of RAM you have since you use DOM and it keeps all the
data in memory.


> how i can write more than this limit?

One approach would be to open a new log file when the the current
file has grown too large. If you must keep everything in one file
then you can use DOM to serialize just one record instead of the
whole document. With this approach you will need to write the
head and tail of your document by hand and set the option on
DOMWriter not to write the XML declaration. I've described this
method in a bit more detail in a post to the Xerces-C++ mailing
list:

http://www.mail-archive.com/c-dev@x.../msg02647.html


hth,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


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