[fpc-pascal] How to save a huge XML?
Zaher Dirkey
parmaja at gmail.com
Tue Jun 18 21:37:44 CEST 2013
On Tue, Jun 18, 2013 at 7:59 PM, Marcos Douglas <md at delfire.net> wrote:
> <?xml version="1.0" encoding="utf-8"?>
> <root>
> <connection login="uref" database="DB_REF"/>
> <start dh="2013-06-18T13:54:57"/>
> <line idDoc="912" status="ok"/>
> <line idDoc="913" status="ok"/>
> <line idDoc="914" status="ok"/>
> <line...>
> <finish dh="2013-06-18T13:54:58"/>
> </root>
>
What about when opening first time the file, write head lines
<?xml version="1.0" encoding="utf-8"?>
<root>
<connection login="uref" database="DB_REF"/>
<start dh="2013-06-18T13:54:57"/>
then when every log you write (simple with format function)
<line idDoc="xxx" status="xxx"/>
And when finish it write the footer
<finish dh="2013-06-18T13:54:58"/>
</root>
I mean writing directly to the file without put it in DOM or any kind of
document in the memory.
--
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3
Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130618/d5facc25/attachment.html>
More information about the fpc-pascal
mailing list