-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmltest.lpr
73 lines (63 loc) · 1.26 KB
/
xmltest.lpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
program xmltest;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils,
{ you can add units after this }
customxml;
type
{ ta }
ta = class
//procedure NewXMLFile;
end;
var
F: tXMLFile;
a: ta;
i: integer;
d: double;
s: string;
begin
a:= ta.create;
//F:= tXMLFile.CreateNew('Keys.xml', true);
F:= TXMLFile.Open('Keys.xml');
while F.IterateNodesWithName('keyb') do
begin
F.SetValue('action', 'aRight');
F.SetValue('keyprim', 'c');
end;
F.Back;
while F.IterateNodesWithName('keyd') do
begin
F.SetValue('action', 'aLeft');
F.SetValue('keyprim', 'd');
end;
{
F.Back;
F.AddNode('keyb');
f.SetValue('action', 'aRight');
F.SetValue('keyprim', 'a');
F.SetValue('keysec', 'b');
F.BackToRoot;
F.SetValue('kek', 1.5);
d:= F.GetValue('kek');
F.SetValue('kek1', d);
F.SetValue('keks', 500);
i:= F.GEtvalue('keks');
F.SetValue('keks1', i);
F.SetValue('kreks', 'peks');
s:= F.GetValue('kreks');
F.SetValue('kreks1', s);}
//F.GetValue();
//F:= tXMLFile.Open('tree.dae');
//F.FindNode('asset', lThisNode);
//F.AddNode();
//F.SetValue();
//F.Back;
//F.ToRoot;
//F.FindNode('',nAll)
//F.GetValue();
readln;
freeandnil(F);
end.