It depends on the size of the xml document. But I have good experience with MSXML and its Saxon colleague.
If xml is large (> 50 MB) or requests are heavy (use some // to bypass the system), expect some delay time. But otherwise it is quite doable.
In later versions, msxml is available as a unit. In version 7, you need to install a type library:
- Go to the project type library \ Import
- Choose Microsoft XML (the highest version you can find)
- Select Create unit to create MSXML_TLB
You can use MSXML_TLB to read XML documents, use xslt, and execute xpath requests:
var doc : IXMLDomDocument2; list : IXMLDomNodeList; node : IXMLDomNode; i : Integer; begin doc := CoDOMDocument.Create; doc.load(xmlfilename); list := doc.selectNodes(xpath); for i := 0 to list.length-1 do begin node := list.item[i]; if node<>nil then Memo1.Lines.Add(node.nodeName); end; end;
source share