For example, there is a long sentence in Cell A1, see the following screenshot. And now you need to find the 3rd occurrence or position of Character c from the text string in Cell A1. Of course, you can count the characters one by one, and get the exact position result.
XPath, the XML Path Language, is a query language for selecting nodes from an XML document.
The following code sample demonstrates how to use XPath with the selectNodes method: 1  Start Visual Basic and create a new Standard EXE. 2  On the menu, select Projects, select References, and then add a reference to Microsoft XML, v3.0. 3  Add the following code to your Form_Load event: Dim dom As DOMDocument30. Dim nodelist As IXMLDOMNodeList.