Hi,
I am having trouble with this code can't seem to load these email values any
Ideas?
XML File
<?xml version="1.0" ?>
<Sections>
<FilePath>
<Path>c:\temp\</Path>
</FilePath>
<Comment>Email list for Report</Comment>
<EMails>
<Address1>So*********@email.com</Address1>
<Address2>So**********@email.com</Address2>
<Address3>So**********@email.com</Address3>
</EMails>
</Sections>
VB Code:
Try
Dim m_xmld As XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
Dim intCounter As Int32
Dim strEmailText As String
'Create the XML Document
m_xmld = New XmlDocument()
'Load the Xml file
m_xmld.Load(m_strXMLPath)
'Get the list of Email nodes
m_nodelist = m_xmld.SelectNodes("/Sections/EMails")
'Loop through the nodes
For Each m_node In m_nodelist
'* Can't seem to load this as only the first get loaded??
strEmailText = m_node.ChildNodes.Item(intCounter).InnerText()
intCounter += 1
Next
Catch errorVariable As Exception
'Error trapping
End Try
Thanks