[Lazarus] How to get the package version from a LPK file?

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Nov 29 08:42:15 CET 2011

On 29/11/2011, Mattias Gaertner <nc-gaertnma at n....e> wrote:
> uses laz2_xmlcfg
>   cfg:=TXMLConfig.Create('/path/to/package.lpk');
>   writeln(cfg.GetValue('Package/Version/Major',''));
>   writeln(cfg.GetValue('Package/Version/Minor',''));
>   writeln(cfg.GetValue('Package/Version/Release',''));
>   writeln(cfg.GetValue('Package/Version/Build',''));
>   cfg.Free;

Thanks Mattias, I trust that solves Silvio's problem. Any idea how you
do the same with the TXMLDocument class or the DOM unit? Seeing that
not all developers would want to use TXMLConfig just to manipulate or
search their XML data.

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the Lazarus mailing list