Parsing XML document
Hello!
I have a xml document
<?xml version="1.0"?>
<MAIN VERSION="5.5A">
<SUBSYS LV="XXX">
<LV>XXX</LV>
<SUBVERSION>5.51</SUBVERSION>
<SUBSYSNAME>SubVersionName</SUBSYSNAME>
<SUBTITLE>SubTitle</SUBTITLE>
</SUBSYS>
<MAIN>
I want to read all the values and attributes on dialog in my report.
var
Lxml: TfsXMLDocument;
Lnx: TfsXmlItem;
a: string;
begin
...
Lxml:= TfsXMLDocument.Create;
Lxml.LoadFromfile (...);
Lnx:= Lxml.Root;
a:= Lnx.Root.Name;
a:= a + ' ' + Lnx.Root.Prop('Version');
ShowMessage (a);
Lxml.free;
end;
I try and I can not get up to attributes on Subsys node.
I have a xml document
<?xml version="1.0"?>
<MAIN VERSION="5.5A">
<SUBSYS LV="XXX">
<LV>XXX</LV>
<SUBVERSION>5.51</SUBVERSION>
<SUBSYSNAME>SubVersionName</SUBSYSNAME>
<SUBTITLE>SubTitle</SUBTITLE>
</SUBSYS>
<MAIN>
I want to read all the values and attributes on dialog in my report.
var
Lxml: TfsXMLDocument;
Lnx: TfsXmlItem;
a: string;
begin
...
Lxml:= TfsXMLDocument.Create;
Lxml.LoadFromfile (...);
Lnx:= Lxml.Root;
a:= Lnx.Root.Name;
a:= a + ' ' + Lnx.Root.Prop('Version');
ShowMessage (a);
Lxml.free;
end;
I try and I can not get up to attributes on Subsys node.
Comments
I also found that it is case sensitive to tag names.