Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Xpath - selectSingleNode -[starts-with??` Xpath - selectSingleNode -[starts-with??`To: NULL Date: 9/30/2007 10:29:00 PM
Hi
Is there away to use starts-with with selectSingleNode?
I have am XML file of lots of random numbers:
<Offset>
<Dist>
<x>1</x>
<x>33</x>
<x>202.5</x>
etc...
etc...
</Dist>
</Offset>
I'm using vb(a) & this works:
Dim NodeLst As IXMLDOMNodeList
OffsetNo = 2
Set NodeLst = MsDom.selectNodes("/Offset/Dist/x[starts-with(.,'" &
OffsetNo & "')]")
But i'd like to use selectSingleNode so I can place the result in a
Listbox using this sort of routine:
Set Child = NodeLst.firstChild
While Not Child Is Nothing
LstBxRecent.AddItem Child.Text
Set Child = Child.nextSibling
Wend
Is this possible? If so please help me out because I'm stuck.
Thanks
Dave F.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
