[fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
Hi, I need to save some huge XML files in HD. Today I call WriteXMLFile(Doc, AFileName) but I have XML with 5G, 10G.. 30G... What the best way to save line by line? Regards, Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Antonio Fortuny
Le 18/06/2013 14:35, Marcos Douglas a écrit : Hi, I need to save some huge XML files in HD. Today I call WriteXMLFile(Doc, AFileName) but I have XML with 5G, 10G.. 30G... What the best way to save "line by line"? Append chuncks of lines to a

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
On Tue, Jun 18, 2013 at 9:39 AM, Antonio Fortuny a.fort...@sitasoftware.lu wrote: Le 18/06/2013 14:35, Marcos Douglas a écrit : Hi, I need to save some huge XML files in HD. Today I call WriteXMLFile(Doc, AFileName) but I have XML with 5G, 10G.. 30G... What the best way to save line by

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Michael Van Canneyt
On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 9:39 AM, Antonio Fortuny a.fort...@sitasoftware.lu wrote: Le 18/06/2013 14:35, Marcos Douglas a écrit : Hi, I need to save some huge XML files in HD. Today I call WriteXMLFile(Doc, AFileName) but I have XML with 5G, 10G..

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
On Tue, Jun 18, 2013 at 10:32 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 9:39 AM, Antonio Fortuny a.fort...@sitasoftware.lu wrote: Le 18/06/2013 14:35, Marcos Douglas a écrit : Hi, I need to save some huge

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Michael Van Canneyt
On Tue, 18 Jun 2013, Marcos Douglas wrote: No. The writer already uses a fixed buffer. Your problem is the use of TXMLDocument. Ideas? Maybe do what Antonio Fortuny said before? Simply put: logging to XML (worse: using DOM) is a VERY bad idea. Well, this is a request of my client.

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Antonio Fortuny
Le 18/06/2013 15:42, Marcos Douglas a écrit : On Tue, Jun 18, 2013 at 10:32 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 9:39 AM, Antonio Fortuny

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
On Tue, Jun 18, 2013 at 10:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: No. The writer already uses a fixed buffer. Your problem is the use of TXMLDocument. Ideas? Maybe do what Antonio Fortuny said before? Simply put: logging to

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
On Tue, Jun 18, 2013 at 10:49 AM, Antonio Fortuny a.fort...@sitasoftware.lu wrote: Le 18/06/2013 15:42, Marcos Douglas a écrit : On Tue, Jun 18, 2013 at 10:32 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 9:39 AM,

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Michael Van Canneyt
On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 10:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: No. The writer already uses a fixed buffer. Your problem is the use of TXMLDocument. Ideas? Maybe do what Antonio

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Michael Van Canneyt
On Tue, 18 Jun 2013, Marcos Douglas wrote: Ideas? Maybe do what Antonio Fortuny said before? Yep, a text file: assign, reset, append, close. I use an own build logger facility (for historical reasons) but I wonder whether Lazarus (or FPC) does not have such a logger component. Ok, thank

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
On Tue, Jun 18, 2013 at 11:01 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 10:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: No. The writer already uses a

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Zaher Dirkey
On Tue, Jun 18, 2013 at 5:01 PM, Michael Van Canneyt mich...@freepascal.org wrote: Regardles of XML or not: keeping logs in memory is simply a bad idea. ​Log it to a csv file, and at the end you can convert it to xml for your client, you can do that without loading it into memory, process it

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Zaher Dirkey
On Tue, Jun 18, 2013 at 6:00 PM, Marcos Douglas m...@delfire.net wrote: But in that way I will have two process to run. I'll write a XML using strings... but thank you. one process, but in function like TXMLLogger.Finish you can convert it, ​using strings ​in memory, it will eat your memory.

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
On Tue, Jun 18, 2013 at 12:04 PM, Zaher Dirkey parm...@gmail.com wrote: On Tue, Jun 18, 2013 at 6:00 PM, Marcos Douglas m...@delfire.net wrote: But in that way I will have two process to run. I'll write a XML using strings... but thank you. one process, but in function like

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Michael Van Canneyt
On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 12:04 PM, Zaher Dirkey parm...@gmail.com wrote: On Tue, Jun 18, 2013 at 6:00 PM, Marcos Douglas m...@delfire.net wrote: But in that way I will have two process to run. I'll write a XML using strings... but thank you.

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Sven Barth
On 18.06.2013 16:01, Michael Van Canneyt wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 10:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: No. The writer already uses a fixed buffer. Your problem is the use

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Michael Van Canneyt
On Tue, 18 Jun 2013, Sven Barth wrote: On 18.06.2013 16:01, Michael Van Canneyt wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 10:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: No. The writer already

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Sven Barth
On 18.06.2013 19:18, Michael Van Canneyt wrote: On Tue, 18 Jun 2013, Sven Barth wrote: On 18.06.2013 16:01, Michael Van Canneyt wrote: On Tue, 18 Jun 2013, Marcos Douglas wrote: On Tue, Jun 18, 2013 at 10:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Tue, 18 Jun 2013,

Re: [fpc-pascal] Re: Declaration of arrays

2013-06-18 Thread Alberto Narduzzi
On 18/06/13 18:42, leledumbo wrote: well, to be honest, int hahaha[10] - hahaha: array[0..9] of integer; it is not just adding 0.. anyway, a change in the converter should be more adequate, IMHO, that by default translates [X] into [0 .. X-1] just my 2c I think this was requested a

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Zaher Dirkey
On Tue, Jun 18, 2013 at 7:59 PM, Marcos Douglas m...@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

Re: [fpc-pascal] Re: Declaration of arrays

2013-06-18 Thread Rainer Stratmann
As for easy migration from C, do you really think removing 0 .. (approximately 4 characters) is a benefit? Yes of course. In large programs it is helping you to be correct all the time when migrating code. See also the statement of Alberto. anyway, a change in the converter should be more

Re: [fpc-pascal] Re: Declaration of arrays

2013-06-18 Thread Florian Klämpfl
Am 18.06.2013 22:02, schrieb Rainer Stratmann: As for easy migration from C, do you really think removing 0 .. (approximately 4 characters) is a benefit? Yes of course. In large programs it is helping you to be correct all the time when migrating code. See also the statement of Alberto.

Re: [fpc-pascal] How to save a huge XML?

2013-06-18 Thread Marcos Douglas
On Tue, Jun 18, 2013 at 4:37 PM, Zaher Dirkey parm...@gmail.com wrote: On Tue, Jun 18, 2013 at 7:59 PM, Marcos Douglas m...@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

Re: [fpc-pascal] Re: Declaration of arrays

2013-06-18 Thread Rainer Stratmann
On Tuesday 18 June 2013 22:10:51 you wrote: Am 18.06.2013 22:02, schrieb Rainer Stratmann: As for easy migration from C, do you really think removing 0 .. (approximately 4 characters) is a benefit? Yes of course. In large programs it is helping you to be correct all the time when

Re: [fpc-pascal] Re: Declaration of arrays

2013-06-18 Thread Jonas Maebe
On 18 Jun 2013, at 22:22, Rainer Stratmann wrote: Yes that is with all kind of information if you don't have backgrund knowledge. Minimising the amount of required background knowledge and making everything self-explanatory is a fundamental part of the Pascal philosophy. As reading your

Re: [fpc-pascal] Re: Declaration of arrays

2013-06-18 Thread Rainer Stratmann
On Tuesday 18 June 2013 22:28:44 you wrote: On 18 Jun 2013, at 22:22, Rainer Stratmann wrote: Yes that is with all kind of information if you don't have backgrund knowledge. Minimising the amount of required background knowledge and making everything self-explanatory is a fundamental

Re: [fpc-pascal] Declaration of arrays

2013-06-18 Thread Mattias Gaertner
On Mon, 17 Jun 2013 22:06:46 +0200 Rainer Stratmann rainerstratm...@t-online.de wrote: For some days I have the mikroPascal Compiler from Mikroelektronika. And I am satisfied with it. http://www.mikroe.com/mikropascal/avr With that product the declaration of an array is also possible with

RE: [fpc-pascal] Declaration of arrays

2013-06-18 Thread Fred van Stappen
C to Pascal converters have this goal. Hum, do you know some good Pascal 2 C converter ? Yes, the world change in the past i was looking for good C2Pas or h2Pas, now i need Pas2C converters... ___ fpc-pascal

Re: [fpc-pascal] Declaration of arrays

2013-06-18 Thread Rainer Stratmann
On Tuesday 18 June 2013 23:47:11 you wrote: For making porting code from other Pascal compilers easier fpc supports the modes (Delphi, TP, MacPas, ...). Do you think it is worth to add a new mikroPascal mode or modeswitch? Don't think that complicated. For this 'revolutionary' feature there

RE: [fpc-pascal] Declaration of arrays

2013-06-18 Thread Fred van Stappen
C to Pascal converters have this goal. Hum, do you know some good Pascal 2 C converter ? Yes, the world change in the past i was looking for good C2Pas or h2Pas, now i need Pas2C converters... Hum, to clarify, i need a Pas 2 C converter, not

RE: [fpc-pascal] AT-SPI fpc compatible ?

2013-06-18 Thread Fred van Stappen
then you'll need to write a wrapper around it which could for example utilize the -vq option to display a message id in front of each message the compiler writes. Hello everybody. I have finish the first part of sak (speecher assistive kit) for fpc. LCL and fpGUI are now totally