Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Simple XPath Question Simple XPath QuestionTo: NULL Date: 7/5/2006 6:50:00 PM
I have a simple xml document and then a simple vbs script to test my
searching.
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.load("1.exe.config")
set
nodes=xmlDoc.selectNodes("//configuration/appSettings[add='test']/add")
for each x in nodes
MsgBox( x.xml )
next
If my file looks like this:
<configuration>
<appSettings>
<add>test</add>
<add ProductName="HostSync" ConfigFile="A.Config"></add>
</appSettings>
</configuration>
it works..
If I rearrange the items to look like this:
<configuration>
<appSettings>
<add ProductName="HostSync" ConfigFile="A.Config"></add>
<add>test</add>
</appSettings>
</configuration>
it fails.
If my 'searched' node isn't the first node it doesn't find anything.
Can anyone assist me?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
