Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB and XML question

Status
Not open for further replies.

bbolte

Programmer
Sep 30, 2002
113
US
i'm building an active x dll that will recieve the parameters it needs as an xml stream (???), meaning it won't be a physical file, basically a string with xml tags in it. i'm trying to use the xml dom to read the nodes but it seems to be choking on the load method. i can't for the life of me figure this out. here's where i'm at so far:

Code:
Private Sub CreateCollection(strXML As String)
'//load xml
xmlDoc.async = False
xmlDoc.validateOnParse = False
didLoad = xmlDoc.Load(strXML)
    
If didLoad Then
    MsgBox "it loaded!"
Else
    MsgBox "nope!"
End If

End Sub

do i need to do something to the "strXML" before i load it into xmlDoc? %-)
 
oops. it's all there actually, i was stripping out all my commented parts and forgot to drop that in. here it is

Code:
Dim xmlDoc As New Msxml2.DOMDocument40, ElemList As IXMLDOMNodeList, RiderCount As Integer
Dim BatchNum As IXMLDOMElement
Dim nodeid As IXMLDOMAttribute
Dim sIdValue As String, i As Integer, didLoad As Boolean
Dim root As IXMLDOMElement
Dim objDOMatt As IXMLDOMAttribute
Dim objNodeList As IXMLDOMNodeList
 
RESOLVED: man i'm thick today, it's "xmlDoc.LoadXML(strXML)", not Load...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top