I've written some XML classes which expose themselves as interfaces. Usage goes something like this:
procedure SaveSettings(const Settings: string); var Document: IDocument; Filer: IFiler; begin Document := CreateDocument; Filer := Document.ForceRoot('test') as IFiler; Filer.WriteTime('time', Now); Filer.WriteString('application', Application.ExeName); Document.SaveToFile(Settings); end; <test><time>21:11:17</time><application>test.exe</application></test> procedure ShowPerson; var Document: IDocument; Root: INode; begin Document := CreateDocument; Filer := Document.ForceRoot('data'); Root.ForceNode('person/age').Value = 17; Root.FindNode('person[age = 17]').Filer.Write('Jason'); Root.Filer.Write('person/salary', 10000); ShowMessage(Document.Text); end; <data><person><age>17</age><name>Jason</name><salary>10000</salary></person><data> _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal