i have a light problem with xml,
here my code:
{.create the document}
CFWxmlFile:=TXMLDocument.Create;
{.create the root node of the configuration file}
CFWxmlRoot:=CFWxmlFile.CreateElement('configfile');
CFWxmlFile.AppendChild(CFWxmlRoot);
{.create the config item "locale"}
CFWxmlRoot:=CFWxmlFile.DocumentElement;
CFWxmlCfgItm:=CFWxmlFile.CreateElement('locale');
TDOMElement(CFWxmlCfgItm).SetAttribute('lang',NSJLang);
CFWxmlRoot.AppendChild(CFWxmlCfgItm);
{.write the file and free the memory}
WriteXMLFile(CFWxmlFile,NSJPathCfg);
CFWxmlFile.Free;
the only problem is that the formating is not good :/
here the result:
<?xml version="1.0"?>
<configfile><locale lang="EN"/></configfile>
what i missed to have an xml file like that ?
<?xml version="1.0"?>
<configfile>
<locale lang="EN"/>
</configfile>
Thanks in advance !
Graeme Geldenhuys wrote:
> On Sun, Oct 5, 2008 at 8:50 PM, eak <[EMAIL PROTECTED]> wrote:
>> how to use xml with lazarus , i don't find document or i found it
>> complex document and i don't understand.
>
> The question is rather: "What do you want to do with XML?" Save
> application settings, export/import data etc...
>
>
>
> Regards,
> - Graeme -
>
>
> _______________________________________________
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus