![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
why you can't do this? wort = root.SelectSingleNode("descendant::e[id='" & <YourVariable> & "'") "a" <hans (AT) georg (DOT) de> escribió en el mensaje news:e82qpi$278$1 (AT) montagut (DOT) cesca.es... I'm trying to read a XML document with the following XPath code (programming in VB .net): Dim doc As XmlDocument = New XmlDocument() doc.Load("c:\la2.xml") Dim wort As XmlNode Dim root As XmlElement = doc.DocumentElement wort = root.SelectSingleNode("descendant::e[id='2']") The single node selected has an element called ID and numbered 2. The problem is: this number 2 has to be a variable number coming from another source. How can I code wort = root.SelectSingleNode("descendant::e[id='2']") in the following way (pseudoicode) wort = root.SelectSingleNode("descendant::e[id='HERE MUST COME A VARIABLE']") Any suggestion to solve this problem is welcome! Oliver |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |