XML conf file aanspreken

Status
Niet open voor verdere reacties.

Myclos81

Gebruiker
Lid geworden
17 nov 2007
Berichten
157
Hallo,

bij onderstaande code wil hij "Dim node As System.Xml.XmlNode" niet uitvoeren. Hij springt er gewoon over. Wat zou de reden daarvan kunnen zijn ?

Ik heb ook het probleem dat hij mijn conf file wist als ik mijn programma start ?? :shocked:

Alle ideeën zijn natuurlijk welkom.

Private Sub setDbPath(ByVal DBPath As String)
System.IO.Directory.SetCurrentDirectory(Application.StartupPath)
Dim node As System.Xml.XmlNode
Dim appConfig As New System.Xml.XmlDocument
appConfig.Load("PcBeheer.exe.config")
For Each node In appConfig.Item("configuration").Item("appSettings")
If node.Name = "add" Then
If node.Attributes.GetNamedItem("key").Value = "dbpath" Then
node.Attributes.GetNamedItem("value").Value = DBPath
End If
End If
Next
appConfig.Save("PcBeheer.exe.config")
End Sub
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan