I want to creat this xml file from a txt file...
i do this Code:
FXml := TNativeXml.CreateName('Root');
FXml.XmlFormat := xfReadable;
open the file
AssignFile(TFile,'user.txt');
Reset(TFile);
while not eof(TFile) do
begin
Readln(TFile,text);
r := Pos(' ',text);
t2 := Trim(Copy(text,1,Length(text)));
t1 := Trim(Copy(t2,0,r));
FXml.Root.NodeNew('row');
FXml.Root.NodeByName('row').WriteAttributeString('user',t2);
FXml.Root.NodeByName('row').WriteAttributeString('pin',t1);
end;
FXml.SaveToFile('new.xml');
FXml.free;
something i do wrong with nodebyname but what...
Thank you...