-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Are you using the VB debugger to trace your code? To debug
Active-X/COM dlls, I usually make a project group, and add a
standalone .exe project to the group w/ my Active-X dll. Then you can
make a button on your form that calls the method of your dll, and
step thru it w/ the visual debugger. Then you will find your problem
in short order.

Hope that helps.

Ben Timby
Webexcellence
PH: 317.423.3548 x23
TF: 800.808.6332 x23
FX: 317.423.8735
[EMAIL PROTECTED]
www.webexc.com 

- -----Original Message-----
From: rhino [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 10:24 AM
To: ActiveServerPages
Subject: OT: Parsing XML sent to VB dll


(sorry, but the XML board does not seem to be working, so I'm hoping
someone here will have some insight....)

I'm sending XML as a string to my VB dll.  The string looks like
this:

strAddresses = 
<Address num=1>
     <StreetNumber>123</StreetNumber>
     <StreetDirection>N</StreetDirection>
     <StreetName>Hickory</StreetName>
</Address> 
<Address num=2>
     <StreetNumber>3652</StreetNumber>
     <StreetDirection>W</StreetDirection>
     <StreetName>Kennedy</StreetName>
</Address>

There may be up to five addresses sent, or only one.  Regardless,
when the
string gets to the dll, I need to loop through the string...
something
like this:

If strAddresses <> "" Then

    Dim oXML As MSXML2.DOMDocument
    Dim oNodeList As MSXML2.IXMLDOMNodeList
    Dim oChild As MSXML2.IXMLDOMNode
    oXML.loadXML strAddresses
    Set oNodeList = oXML.getElementsByTagName("Address")
    
    Dim i
    For i = 0 To (oNodeList.Length - 1)
    
    If oNodeList.Item(i) = "StreetNumber" Then
        StreetNumber = oNodeList.Item(i).Text
    ElseIf oNodeList.Item(i) = "StreetDirection" Then
        StreetDirection = oNodeList.Item(i).Text
    ElseIf oNodeList.Item(i) = "StreetName" Then
        StreetName = oNodeList.Item(i).Text
    End If

'The following is where I create my sql string.  
'I've taken a lot out of it to simplify it. 
'Sufficit it to say, I'm looping through the 
'XML string (strAddresses) and adding conditions on to the 
'SQL string - specified by the children of each "Address" node. 

 If StreetNumber <> "" Then
     strCriteria = "(L.AddressNumber = '" & StreetNumber & "')"
 End If

    strCriteria = strCriteria & strCriteria
    
    Next

End If

This is not working.  To make the problem worse, I have no error
description to work with.  I only know it is not working.  Anyone see
anything wrong with the above, or have any clues that might lead me
in the
right direction?  Thanks in advance.  Ryan

- ---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPW0lCvnby1cCm2Q8EQJz/wCeLJ0Fn6pIF111hr9iUYgcZ62IW+cAoPMj
svH+1cRevD6yKNSEfjSQ8O60
=yoSI
-----END PGP SIGNATURE-----



---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to