mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 06:39:26 +02:00
examples: testxmlreader, fixed typo
git-svn-id: branches/fixes_1_6@51437 -
This commit is contained in:
parent
8db992e117
commit
99f8b0921c
8
.gitattributes
vendored
8
.gitattributes
vendored
@ -5632,10 +5632,10 @@ examples/widestringstreaming/mainunit.lfm svneol=native#text/plain
|
|||||||
examples/widestringstreaming/mainunit.pas svneol=native#text/plain
|
examples/widestringstreaming/mainunit.pas svneol=native#text/plain
|
||||||
examples/widestringstreaming/widestringstreaming.lpi svneol=native#text/plain
|
examples/widestringstreaming/widestringstreaming.lpi svneol=native#text/plain
|
||||||
examples/widestringstreaming/widestringstreaming.lpr svneol=native#text/plain
|
examples/widestringstreaming/widestringstreaming.lpr svneol=native#text/plain
|
||||||
examples/xmlreader/TestXMLReder.ico -text svneol=unset#image/ico
|
examples/xmlreader/TestXMLReader.ico -text svneol=unset#image/ico
|
||||||
examples/xmlreader/TestXMLReder.lpi svneol=native#text/plain
|
examples/xmlreader/TestXMLReader.lpi svneol=native#text/plain
|
||||||
examples/xmlreader/TestXMLReder.lpr svneol=native#text/plain
|
examples/xmlreader/TestXMLReader.lpr svneol=native#text/plain
|
||||||
examples/xmlreader/TestXMLReder.res -text
|
examples/xmlreader/TestXMLReader.res -text
|
||||||
examples/xmlreader/test.xml svneol=native#text/plain
|
examples/xmlreader/test.xml svneol=native#text/plain
|
||||||
examples/xmlreader/testxmlreaderunit.lfm svneol=native#text/plain
|
examples/xmlreader/testxmlreaderunit.lfm svneol=native#text/plain
|
||||||
examples/xmlreader/testxmlreaderunit.pas svneol=native#text/plain
|
examples/xmlreader/testxmlreaderunit.pas svneol=native#text/plain
|
||||||
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@ -8,7 +8,7 @@
|
|||||||
</Flags>
|
</Flags>
|
||||||
<SessionStorage Value="InIDEConfig"/>
|
<SessionStorage Value="InIDEConfig"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<Title Value="TestXMLReder"/>
|
<Title Value="TestXMLReader"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
<Icon Value="0"/>
|
<Icon Value="0"/>
|
||||||
@ -39,14 +39,13 @@
|
|||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="2">
|
<Units Count="2">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="TestXMLReder.lpr"/>
|
<Filename Value="TestXMLReader.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="TestXMLReder"/>
|
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="testxmlreaderunit.pas"/>
|
<Filename Value="testxmlreaderunit.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="XMLRederForm"/>
|
<ComponentName Value="XMLReaderForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="TestXMLReaderUnit"/>
|
<UnitName Value="TestXMLReaderUnit"/>
|
||||||
@ -56,7 +55,7 @@
|
|||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<Target>
|
<Target>
|
||||||
<Filename Value="TestXMLReder"/>
|
<Filename Value="TestXMLReader"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
@ -69,9 +68,6 @@
|
|||||||
</Win32>
|
</Win32>
|
||||||
</Options>
|
</Options>
|
||||||
</Linking>
|
</Linking>
|
||||||
<Other>
|
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
|
||||||
</Other>
|
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<Exceptions Count="3">
|
<Exceptions Count="3">
|
@ -13,7 +13,7 @@ uses
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TXMLRederForm, XMLRederForm);
|
Application.CreateForm(TXMLReaderForm, XMLReaderForm);
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
object XMLRederForm: TXMLRederForm
|
object XMLReaderForm: TXMLReaderForm
|
||||||
Left = 312
|
Left = 312
|
||||||
Height = 381
|
Height = 381
|
||||||
Top = 119
|
Top = 119
|
||||||
@ -10,14 +10,15 @@ object XMLRederForm: TXMLRederForm
|
|||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.1'
|
LCLVersion = '1.7'
|
||||||
object TreeView1: TTreeView
|
object TreeView1: TTreeView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 315
|
Height = 316
|
||||||
Top = 66
|
Top = 65
|
||||||
Width = 342
|
Width = 342
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
AutoExpand = True
|
AutoExpand = True
|
||||||
|
DefaultItemHeight = 18
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnClick = TreeView1Click
|
OnClick = TreeView1Click
|
||||||
@ -25,12 +26,12 @@ object XMLRederForm: TXMLRederForm
|
|||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 66
|
Height = 65
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 732
|
Width = 732
|
||||||
Align = alTop
|
Align = alTop
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ClientHeight = 66
|
ClientHeight = 65
|
||||||
ClientWidth = 732
|
ClientWidth = 732
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object BitBtn1: TBitBtn
|
object BitBtn1: TBitBtn
|
||||||
@ -38,10 +39,10 @@ object XMLRederForm: TXMLRederForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Panel1
|
AnchorSideRight.Control = Panel1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 650
|
Left = 665
|
||||||
Height = 29
|
Height = 30
|
||||||
Top = 30
|
Top = 28
|
||||||
Width = 75
|
Width = 60
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -66,9 +67,9 @@ object XMLRederForm: TXMLRederForm
|
|||||||
AnchorSideLeft.Control = Panel1
|
AnchorSideLeft.Control = Panel1
|
||||||
AnchorSideTop.Control = Panel1
|
AnchorSideTop.Control = Panel1
|
||||||
Left = 7
|
Left = 7
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 61
|
Width = 52
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'File name'
|
Caption = 'File name'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -79,7 +80,7 @@ object XMLRederForm: TXMLRederForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 13
|
Left = 13
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 30
|
Top = 28
|
||||||
Width = 620
|
Width = 620
|
||||||
FileName = 'test.xml'
|
FileName = 'test.xml'
|
||||||
DialogOptions = []
|
DialogOptions = []
|
||||||
@ -93,30 +94,31 @@ object XMLRederForm: TXMLRederForm
|
|||||||
BorderSpacing.Bottom = 6
|
BorderSpacing.Bottom = 6
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
Text = 'test.xml'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 342
|
Left = 342
|
||||||
Height = 315
|
Height = 316
|
||||||
Top = 66
|
Top = 65
|
||||||
Width = 5
|
Width = 5
|
||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 347
|
Left = 347
|
||||||
Height = 315
|
Height = 316
|
||||||
Top = 66
|
Top = 65
|
||||||
Width = 385
|
Width = 385
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Panel2'
|
Caption = 'Panel2'
|
||||||
ClientHeight = 315
|
ClientHeight = 316
|
||||||
ClientWidth = 385
|
ClientWidth = 385
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object ListView1: TListView
|
object ListView1: TListView
|
||||||
AnchorSideTop.Control = Edit2
|
AnchorSideTop.Control = Edit2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 1
|
Left = 1
|
||||||
Height = 199
|
Height = 204
|
||||||
Top = 115
|
Top = 111
|
||||||
Width = 383
|
Width = 383
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@ -138,9 +140,9 @@ object XMLRederForm: TXMLRederForm
|
|||||||
AnchorSideLeft.Control = Panel2
|
AnchorSideLeft.Control = Panel2
|
||||||
AnchorSideTop.Control = Panel2
|
AnchorSideTop.Control = Panel2
|
||||||
Left = 7
|
Left = 7
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 75
|
Width = 63
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Node name'
|
Caption = 'Node name'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -150,9 +152,9 @@ object XMLRederForm: TXMLRederForm
|
|||||||
AnchorSideTop.Control = Edit1
|
AnchorSideTop.Control = Edit1
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 7
|
Left = 7
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 61
|
Top = 59
|
||||||
Width = 72
|
Width = 62
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Node value'
|
Caption = 'Node value'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -165,7 +167,7 @@ object XMLRederForm: TXMLRederForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 13
|
Left = 13
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 30
|
Top = 28
|
||||||
Width = 365
|
Width = 365
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -180,7 +182,7 @@ object XMLRederForm: TXMLRederForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 13
|
Left = 13
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 84
|
Top = 80
|
||||||
Width = 365
|
Width = 365
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
|
@ -10,9 +10,9 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TXMLRederForm }
|
{ TXMLReaderForm }
|
||||||
|
|
||||||
TXMLRederForm = class(TForm)
|
TXMLReaderForm = class(TForm)
|
||||||
BitBtn1: TBitBtn;
|
BitBtn1: TBitBtn;
|
||||||
Edit1: TEdit;
|
Edit1: TEdit;
|
||||||
Edit2: TEdit;
|
Edit2: TEdit;
|
||||||
@ -37,14 +37,14 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
XMLRederForm: TXMLRederForm;
|
XMLReaderForm: TXMLReaderForm;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
{ TXMLRederForm }
|
{ TXMLReaderForm }
|
||||||
|
|
||||||
procedure TXMLRederForm.BitBtn1Click(Sender: TObject);
|
procedure TXMLReaderForm.BitBtn1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Assigned(FDoc) then
|
if Assigned(FDoc) then
|
||||||
FreeAndNil(FDoc);
|
FreeAndNil(FDoc);
|
||||||
@ -55,13 +55,13 @@ begin
|
|||||||
ParseDoc;
|
ParseDoc;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TXMLRederForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
procedure TXMLReaderForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||||
begin
|
begin
|
||||||
if Assigned(FDoc) then
|
if Assigned(FDoc) then
|
||||||
FDoc.Free;
|
FDoc.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TXMLRederForm.FormCreate(Sender: TObject);
|
procedure TXMLReaderForm.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ParamCount > 0 then
|
if ParamCount > 0 then
|
||||||
begin
|
begin
|
||||||
@ -72,7 +72,7 @@ begin
|
|||||||
TreeView1Click(nil);
|
TreeView1Click(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TXMLRederForm.TreeView1Click(Sender: TObject);
|
procedure TXMLReaderForm.TreeView1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
Node:TDOMNode;
|
Node:TDOMNode;
|
||||||
Item:TListItem;
|
Item:TListItem;
|
||||||
@ -101,7 +101,7 @@ begin
|
|||||||
ListView1.EndUpdate;
|
ListView1.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TXMLRederForm.ParseDoc;
|
procedure TXMLReaderForm.ParseDoc;
|
||||||
|
|
||||||
procedure DoFill(AOwner:TTreeNode; Node:TDOMNode);
|
procedure DoFill(AOwner:TTreeNode; Node:TDOMNode);
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user