Hey,
I was hoping someone could help out with converting this code:
The code is in VB5/6 but i need to get it to vb.net 2005, could anyone help me out? im sure theres a simple new rule to it or something.Code:Public Function LoadXMLNode() Dim xmlDoc As DOMDocument30 Dim intCounter As Integer Set xmlDoc = New MSXML2.DOMDocument30 Me.TxtXMLOut.Text = "" xmlDoc.loadXML Me.TxtXML.Text Call RecurseChildNodes(xmlDoc, xmlDoc.childNodes) Set xmlDoc = Nothing End Function Public Function RecurseChildNodes(xmlDoc As MSXML2.DOMDocument30, childNode As IXMLDOMNodeList) Dim CurrChildNode 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.TxtXMLOut.Text = Me.TxtXMLOut.Text & CurrChildNode.Item(intNodeCounter).nodeName & "= " & CurrChildNode.Item(intNodeCounter).nodeTypedValue & vbCrLf End If End If Next intNodeCounter End Function
I get errors saying:
MSXML2.DOMDocument30 is not defined
DOMDocument30 is not defined
IXMLDOMNodeList is not defined
Thanks for any help
lee




Reply With Quote