Create a new Delphi project and drop a TListView (Name: 'LV') component on a form. Add a TButton (Name : 'btnRefresh') and a TXMLDocument (Name : 'XMLDoc'). Next, add three columns to the ListView component (Title, Link and Description). Finally, add the code to download the XML file, parse it with TXMLDocument and display inside the ListView in the button's OnClick event handler.
Below you can find the portion of that code. The entire code is available for download.
var
StartItemNode : IXMLNode;
ANode : IXMLNode;
STitle, sDesc, sLink : WideString;
begin
...
//points to local XML file in "original" code
XMLDoc.FileName := 'http://0.tqn.com/6/g/delphi/b/index.xml';
XMLDoc.Active:=True;
StartItemNode := XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('item') ;
ANode := StartItemNode;
repeat
STitle := ANode.ChildNodes['title'].Text;
sLink := ANode.ChildNodes['link'].Text;
sDesc := ANode.ChildNodes['description'].Text;
//add to list view
with LV.Items.Add do
begin
Caption := STitle;
SubItems.Add(sLink) ;
SubItems.Add(sDesc)
end;
ANode := ANode.NextSibling;
until ANode = nil;
