[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gb.xml2: xmlwriter gives error on creating xml file


Le 12/11/2026 à 13:14, gbWilly a écrit :
On Thursday, November 12th, 2026 at 01:07, Brian G <brian@xxxxxxxxxxxxxxxx> wrote:

On 11/11/26 13:28, gbWilly wrote:

On Wednesday, November 11th, 2026 at 19:16, Brian G <brian@xxxxxxxxxxxxxxxx> wrote:

Can I also get a copy of your test file?

--
It is attached in the first post


when I test it, it looks like the file.load, is loading an empty file,
as if the hWriter.Close, is not writing the data, but has created the file,

   then later the data is written/flushed to the file when the app closes


That was kind of what I was thinking that is happening, the file wanting to open when it is not yet closed by the xmlwriter.


I added a hex editor into the app and it also shows no data.

code ......
   hWriter.Close                         ' closes the xml file, but
really does not, it does not flush the data to the app is closed
    '--end create xml file--
    Print Quote(sFile)
    Shell "ghex /home/brian/Desktop/test.xml" Wait ' also opens an empty file
    Print File.Load(sFile)   'gets an empty file
    Print Quote(sFile)

Thanks for testing,

gbWilly

I added a flush (normally not needed) in 'XmlWriter.Close()' in the last commit . Tell me if it changes something.

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: gb.xml2: xmlwriter gives error on creating xml filegbWilly <gbWilly@xxxxxxxxxxxxxx>
References:
gb.xml2: xmlwriter gives error on creating xml filegbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: gb.xml2: xmlwriter gives error on creating xml fileBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: gb.xml2: xmlwriter gives error on creating xml filegbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: gb.xml2: xmlwriter gives error on creating xml fileBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: gb.xml2: xmlwriter gives error on creating xml fileBrian G <brian@xxxxxxxxxxxxxxxx>
Re: gb.xml2: xmlwriter gives error on creating xml filegbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: gb.xml2: xmlwriter gives error on creating xml fileBrian G <brian@xxxxxxxxxxxxxxxx>
Re: gb.xml2: xmlwriter gives error on creating xml filegbWilly <gbWilly@xxxxxxxxxxxxxx>