Hey guys I'm trying to see if someone can give me a nudge in the right direction here.
All I need is two simple procedures:
1. Load XML Entries into TListBox
2. When ListBox is clicked, find string pointing to filename so I can display the item's associated file.
My XML file is structured like this:
<?xml version="1.0" standalone="yes"?>
<Dictionary>
<Item Name="A Kempis, Thomas">
<Definition>A Kempis Thomas.html</Definition>
</Item>
<Item Name="A solis ortus cardine">
<Definition>A solis ortus cardine.html</Definition>
</Item>
</Dictionary>
So procedure 1 would load Item Names into the ListBox, then another procedure called in the ListBox's onclick would search <item> for <definition> which is a filename to be loaded into string.
Can someone help me please?
Right now I'm using TXMLTransform, TClientDataSet and TDataSource and it's VERY slow. I'm working with a lot of items, so I'm hoping eliminating the DB comps will speed things up a bit.
I'm working with over 12 thousand items.
So far I have this code, but I'm not sure how to cycle through items etc.
procedure TForm1.LoadDict;
var
XMLPath : String;
XMLReader : TXMLDocument;
iNode : Integer;
mystr: String;
begin
XMLPath := ExtractFilePath(Application.ExeName) + '\data\Dictionary.xml';
XMLReader := TXMLDocument.Create(Self);
XMLReader.LoadFromFile(XMLPath);
XMLReader.Active := True;
{No Idea where to start}
end;