E
Elmo Watson
I've got a Winforms app and I'm trying to parse an ASP.Net web.config file
(xml)
I need to search each of the connectionstrings in the connectionstrings
section, to see if the name is there already
then, I need to write out the new node, if it's not there already
I'm having trouble figuring out how to get the child nodes, singly - here's
what I've got so far
Dim m_xmld = New System.Xml.XmlDocument
m_xmld.PreserveWhitespace = True
Dim m_nodelist As System.Xml.XmlNodeList
Dim m_node As System.Xml.XmlNode
m_xmld.Load(spath & "\web.config")
m_nodelist = m_xmld.SelectNodes("//configuration/connectionStrings")
For Each m_node In m_nodelist
MessageBox.Show(m_node.InnerXml) ' this just gives me all of
the nodes in one string - I've tried other properties, but I've been
unsuccessful
Next
Two questions:
What can I use to show me each node, separately in the nodelist?
Then, how can I add a node in that section?
(xml)
I need to search each of the connectionstrings in the connectionstrings
section, to see if the name is there already
then, I need to write out the new node, if it's not there already
I'm having trouble figuring out how to get the child nodes, singly - here's
what I've got so far
Dim m_xmld = New System.Xml.XmlDocument
m_xmld.PreserveWhitespace = True
Dim m_nodelist As System.Xml.XmlNodeList
Dim m_node As System.Xml.XmlNode
m_xmld.Load(spath & "\web.config")
m_nodelist = m_xmld.SelectNodes("//configuration/connectionStrings")
For Each m_node In m_nodelist
MessageBox.Show(m_node.InnerXml) ' this just gives me all of
the nodes in one string - I've tried other properties, but I've been
unsuccessful
Next
Two questions:
What can I use to show me each node, separately in the nodelist?
Then, how can I add a node in that section?