Delphi and XPath Functions
Is it possible to use the Xpath node set function position () function in Delphi's selectNodes () function to select only a certain number of items from a node list? If I like this:
selectNodes('Item[1]')
its all great and i get the item at index 1, but when i try
selectNodes('Item[position()<10]')
I am getting an "unknown method" exception when I try
selectNodes('Item[<10]')
I am getting "unexpected token <". I am using delphi7 and I also imported the new type library into my project with newer versions of msxml.
source to share
This is not a Delphi question I think, but MSXML. Check out MSXML documents, or rather MS XPath documents .
Hmm, according to the XPath examples posted on MSDN, " Item[position() < 10]
" should work, at least if " Item
" is the name of the element you are after ...
source to share