kennedymr2
Programmer
I am new to xml....
I have the following code which seems to get me the nodes all ok.
But i would like to get the Attribute Names and values as well..eg the line looks like
<ESchedule>
<EID="1054337_01" EC="XXX" />
The code i am using is....i guess i need the attributes where i have ????????????????????
Public Function RecurseChildNodes(xmlDoc As MSXML2.DOMDocument30, childNode As IXMLDOMNodeList)
Dim CurrChildNode As IXMLDOMNodeList
Dim CurrChildNode2 As IXMLDOMNodeList
Dim intNodeCounter As Integer
Set CurrChildNode = childNode
For intNodeCounter = 0 To CurrChildNode.length - 1
If CurrChildNode.length > 0 Then
Set childNode = CurrChildNode.Item(intNodeCounter).childNodes
If childNode.length > 0 Then
RecurseChildNodes xmlDoc, childNode
Me.Txt.text = Me.TxtXmlOut.Text & CurrChildNode.Item(intNodeCounter).nodeName & "= " & CurrChildNode.Item(intNodeCounter).nodeTypedValue & vbCrLf
'?????????????????????????????????
End If
End If
Next intNodeCounter
End Function
Alternatively...!!! Just some simple code that does a list of all nodes and the attributes.......
If someone has the time i would really apprciate the help
Regards Kennedymr2
I have the following code which seems to get me the nodes all ok.
But i would like to get the Attribute Names and values as well..eg the line looks like
<ESchedule>
<EID="1054337_01" EC="XXX" />
The code i am using is....i guess i need the attributes where i have ????????????????????
Public Function RecurseChildNodes(xmlDoc As MSXML2.DOMDocument30, childNode As IXMLDOMNodeList)
Dim CurrChildNode As IXMLDOMNodeList
Dim CurrChildNode2 As IXMLDOMNodeList
Dim intNodeCounter As Integer
Set CurrChildNode = childNode
For intNodeCounter = 0 To CurrChildNode.length - 1
If CurrChildNode.length > 0 Then
Set childNode = CurrChildNode.Item(intNodeCounter).childNodes
If childNode.length > 0 Then
RecurseChildNodes xmlDoc, childNode
Me.Txt.text = Me.TxtXmlOut.Text & CurrChildNode.Item(intNodeCounter).nodeName & "= " & CurrChildNode.Item(intNodeCounter).nodeTypedValue & vbCrLf
'?????????????????????????????????
End If
End If
Next intNodeCounter
End Function
Alternatively...!!! Just some simple code that does a list of all nodes and the attributes.......
If someone has the time i would really apprciate the help
Regards Kennedymr2