Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 and Xpath. Trouble getting value back

Status
Not open for further replies.

wadey

Programmer
Jun 6, 2006
54
GB
xml is this:-
<FORM name="PolicySelect" enabled="true">
<COMMAND name="cmdUpload" enabled="true"/>
</FORM>

VB is this:-
'objControl is passed in and currently is a command button with the name of cmdUpload.

strControlName = objControl.Name

'get xml node for control
Set objNode = objXMLDom.selectSingleNode("*[@name=" & strControlName & "]")


after this is run objNode is equal to nothing.
 
Set objNode = objXMLDom.selectSingleNode("*[@name=" & strControlName & "]")
[tt]Set objNode = objXMLDom.selectSingleNode("[red]//[/red]*[@name=[red]'[/red]" & strControlName & "[red]'[/red]]")[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top