On Sun, 6 Feb 2005, Ales Katona wrote:
> Try this program with a corrupted xml file(just delte part of a tag or
> something)
> Compile with -ghl and you'll get a few bytes leaked.
I believe this is the bug Vincent Snijders was talking about.
I will look at it; I need to change the xmlread and xmlwrite
units anyway.
Michael.
>
> program xmltest;
>
> {$mode objfpc}{$H+}
>
> uses
> SysUtils, XMLCfg;
>
> function LoadXML(var axml: TXmlConfig; const filename: string): boolean;
> begin
> writeln('Loading');
> axml:=nil;
> result:=true;
> try
> axml:=TXMlConfig.Create(filename); // try to parse the file
> except
> on E: Exception do
> begin
> writeln('Error: '+ E.Message);
> result:=false;
> end;
> end;
> if not result then
> freeandnil(axml);
> end;
>
> var xml: TXMLConfig;
> begin
> if LoadXML(xml, 'test.xml') then
> writeln('Success');
> end.
>
> _______________________________________________
> fpc-devel maillist - [email protected]
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel