Good afternoon! I work with the Delphi 2009 library and MSXML2_TLB (IXMLDOM). I need to select the latest node assembly:
Doc := CreateOleObject('Microsoft.XMLDOM') as IXMLDomDocument; Doc.loadXML(XmlStr); tmpNode:= Doc.selectSingleNode('//Meeting[last()]');
But in the last line of the above code, I get an exception:
Project test.exe raised exception class EOleException with message: 'Unknown method //Meeting[-->last()<--]'
Is there a way to select the last node using xpath or do I really need to write code to get a list of node and then select the last element?
Version Information:
Type Lib: C:\WINDOWS\system32\msxml6.dll (1) LIBID: {F5078F18-C551-11D3-89B9-0000F81FE221} HelpString: Microsoft XML, v6.0
Thank you in advance! Voitech
source share