Xml interface
The following is a listing of the Xml interfaces.
01
{ IFiler }
02
03
type
04
IFiler =
interface
05
[
'{3DC4CC5C-AFFC-449F-9983-11FE39194CF5}'
]
06
function
GetDocument: IDocument;
07
procedure
Encrypt(
const
Key, Value:
string
);
08
function
Decrypt(
const
Key:
string
):
string
;
09
function
ReadStr(
const
Key:
string
;
const
DefValue:
string
=
''
; Stored: Boolean = False):
string
;
10
procedure
WriteStr(
const
Key, Value:
string
);
11
function
ReadBool(
const
Key:
string
;
const
DefValue: Boolean = False; Stored: Boolean = False): Boolean;
12
procedure
WriteBool(
const
Key:
string
; Value: Boolean);
13
function
ReadInt(
const
Key:
string
;
const
DefValue: Integer =
0
; Stored: Boolean = False): Integer;
14
procedure
WriteInt(
const
Key:
string
; Value: Integer);
15
function
ReadFloat(
const
Key:
string
;
const
DefValue: Single =
0
; Stored: Boolean = False): Single;
16
procedure
WriteFloat(
const
Key:
string
; Value: Single);
17
function
ReadDate(
const
Key:
string
;
const
DefValue: TDateTime =
0
; Stored: Boolean = False): TDateTime;
18
procedure
WriteDate(
const
Key:
string
; Value: TDateTime);
19
property
Document: IDocument
read
GetDocument;
20
end
;
21
22
{ INode }
23
24
INode =
interface
25
[
'{BC90FD97-E83D-41BB-B4D8-3E25AA5EB2C6}'
]
26
function
GetDocument: IDocument;
27
function
GetParent: INode;
28
function
GetFiler: IFiler;
29
function
GetAttributes: INodeList;
30
function
GetNodes: INodeList;
31
function
GetKind: TNodeKind;
32
function
GetName:
string
;
33
function
GetText:
string
;
34
procedure
SetText(
const
Value:
string
);
35
function
GetXml:
string
;
36
procedure
SetXml(
const
Value:
string
);
37
function
Instance:
Pointer
;
38
function
Next: INode;
39
function
SelectNode(
const
XPath:
string
): INode;
40
function
SelectList(
const
XPath:
string
): INodeList;
41
function
Force(
const
Path:
string
): INode;
42
property
Document: IDocument
read
GetDocument;
43
property
Parent: INode
read
GetParent;
44
property
Filer: IFiler
read
GetFiler;
45
property
Attributes: INodeList
read
GetAttributes;
46
property
Nodes: INodeList
read
GetNodes;
47
property
Kind: TNodeKind
read
GetKind;
48
property
Name:
string
read
GetName;
49
property
Text:
string
read
GetText
write
SetText;
50
property
Xml:
string
read
GetXml
write
SetXml;
51
end
;
52
53
{ INodeList }
54
55
INodeList =
interface
(IEnumerable<INode>)
56
[
'{D36A2B84-D31D-4134-B878-35E8D33FD067}'
]
57
function
GetCount: Integer;
58
function
GetByName(
const
Name:
string
): INode;
overload
;
59
function
GetByIndex(Index: Integer): INode;
overload
;
60
procedure
Clear;
61
procedure
Add(Node: INode);
overload
;
62
function
Add(
const
Name:
string
): INode;
overload
;
63
procedure
Remove(Node: INode);
overload
;
64
procedure
Remove(
const
Name:
string
);
overload
;
65
property
Count: Integer
read
GetCount;
66
property
ByName[
const
Name:
string
]: INode
read
GetByName;
67
property
ByIndex[Index: Integer]: INode
read
GetByIndex; default;
68
end
;
69
70
{ IDocument }
71
72
IDocument =
interface
(INode)
73
[
'{B713CB91-C809-440A-83D1-C42BDF806C4A}'
]
74
procedure
SetRoot(Value: INode);
75
function
GetRoot: INode;
76
procedure
Beautify;
77
function
CreateAttribute(
const
Name:
string
): INode;
78
function
CreateElement(
const
Name:
string
): INode;
79
procedure
Load(
const
FileName:
string
);
80
procedure
Save(
const
FileName:
string
);
81
property
Root: INode
read
GetRoot
write
SetRoot;
82
end
;