S
Sam
Hi,
I've got the following xml file:
<?xml version="1.0" encoding="utf-8" ?>
<ToolTip>
<table tag="some explanations about tables"/>
<view tag="some explanations about views"/>
</ToolTip>
and with the following code i'm trying to read a particular node :
Public Function LoadToolTip(ByVal Form As String, ByVal Tag As String)
As String
Dim xDoc As New XmlDocument
Try
Dim filePath As String = "../ToolTips/" & Form & ".xml"
xDoc.Load(filePath)
Dim xNodeList As XmlNodeList = xDoc.SelectNodes("/ToolTip/"
& Tag & "/@tag")
Return xNodeList.Item(0).Value
Catch ex As Exception
MsgBox(ex.ToString)
End Try
end function
But xNodeList is always empty and that leads to a crash. What am I
doing wrong when reading the node ?
Thx
I've got the following xml file:
<?xml version="1.0" encoding="utf-8" ?>
<ToolTip>
<table tag="some explanations about tables"/>
<view tag="some explanations about views"/>
</ToolTip>
and with the following code i'm trying to read a particular node :
Public Function LoadToolTip(ByVal Form As String, ByVal Tag As String)
As String
Dim xDoc As New XmlDocument
Try
Dim filePath As String = "../ToolTips/" & Form & ".xml"
xDoc.Load(filePath)
Dim xNodeList As XmlNodeList = xDoc.SelectNodes("/ToolTip/"
& Tag & "/@tag")
Return xNodeList.Item(0).Value
Catch ex As Exception
MsgBox(ex.ToString)
End Try
end function
But xNodeList is always empty and that leads to a crash. What am I
doing wrong when reading the node ?
Thx