this my function in my windowsapplicat ionform
Error : Could not find file 'C:\Users\moham mad.CATS\Docume nts\Visual Studio 2008\Projects\A Rtrnc02\ARtrnc0 2\bin\Debug\XML File.xml'.
how can I do know pleas give coe connection xml in my vb.net eindows application 2008
Code:
Public Function getxml() As String
Dim connection As String = ""
Dim xml As New XmlDocument()
xml.Load("C:\Users\mohammad.CATS\Documents\Visual Studio 2008\Projects\ARtrnc02\ARtrnc02")
Dim xnf As XmlNode = xml.SelectSingleNode("configuration")
Dim child As XmlNodeList = xnf.ChildNodes
For Each c As XmlNode In child
If TryCast(c, XmlElement).Name = "appsetting" Then
Dim xnl As XmlNodeList = c.ChildNodes
For Each xns As XmlNode In xnl
Dim xe As XmlElement = DirectCast(xns, XmlElement)
If xe.GetAttribute("key") = "constr" Then
connection = xe.GetAttribute("value")
Else
Continue For
End If
Next
Else
Continue For
End If
Next
Return connection
End Function
how can I do know pleas give coe connection xml in my vb.net eindows application 2008