mancombseepgood
Executive Member
I have a simple XML document:
---
---
I am using VB to read a single element called Set where the 'Name'
attribute = 'Second'.
My code is as follows:
---
---
The above code never returns anything... what am I missing?
Thanks
---
Code:
<?xml version="1.0" encoding="utf-8"?>
<Installations Current="Third">
<Set Name="Default">
<MaintCnt>10</MaintCnt>
<Location>C:\Installation\Default</Location>
<Lastuser />
<Version>Unknown</Version>
</Set>
<Set Name="Second">
<MaintCnt>9</MaintCnt>
<Location>C:\Installation\Second</Location>
<Lastuser />
<Version>2.003</Version>
</Set>
<Set Name="Third">
<MaintCnt>8</MaintCnt>
<Location>C:\Installation\Third</Location>
<Lastuser />
<Version>1.306</Version>
</Set>
</Installations>
I am using VB to read a single element called Set where the 'Name'
attribute = 'Second'.
My code is as follows:
---
Code:
Dim doc As XmlDocument = New XmlDocument()
doc.Load("C:\Installation\install.xml")
Dim setnm As XmlNode
setnm = doc.SelectSingleNode("/Installations/Set[@Name= Second ]")
The above code never returns anything... what am I missing?
Thanks