Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3322232
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:09:27+00:00 2026-05-17T23:09:27+00:00

I have a situation in which I need to dump XML into an ADODB

  • 0

I have a situation in which I need to dump XML into an ADODB Recordset in VBScript. My XML is in the form below. What I would like to do in my code is convert the XML into a recordset with AddressObject rows. The code below I tried but keep running into one DomDocument error after another. Can anyone please help me with a solution for this? I tried the code below in Notepad++ but still unable to get the right result.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Header>
        <AuthorizationToken xmlns="http://www.avectra.com/2005/">
            <Token>8d92d5ba-8b06-4464-9829-86eacac68e6c</Token>
        </AuthorizationToken>
    </soap:Header>
    <soap:Body>
        <GetQueryResponse xmlns="http://www.avectra.com/2005/">
            <GetQueryResult>
                <AddressObjects xsi:schemaLocation="http://www.avectra.com/2005/ Address.xsd" recordReturn="1">
                    <AddressObject>
                        <adr_key>2bbcd09f-89c7-4558-93bb-ce23e832ab94</adr_key>
                        <adr_line1>1447 Limerick Lane</adr_line1>
                        <adr_line2 xsi:nil="true" />
                        <adr_line3 xsi:nil="true" />
                        <adr_city>Canyon Lake</adr_city>
                        <adr_state>TX</adr_state>
                        <adr_post_code>78133</adr_post_code>
                        <adr_city_state_code>Canyon Lake, TX  78133</adr_city_state_code>
                        <adr_country>UNITED STATES</adr_country>
                        <adr_intl_province xsi:nil="true" />
                        <adr_county>Comal</adr_county>
                        <adr_bad_address_flag>0</adr_bad_address_flag>
                        <adr_no_validation_flag>0</adr_no_validation_flag>
                        <cst_id>001049008I</cst_id>
                    </AddressObject>
                </AddressObjects>
            </GetQueryResult>
        </GetQueryResponse>
    </soap:Body>
</soap:Envelope>


Public Function XMLToRecSet(Byref objXMLDoc2) 
 Dim rsReturn  
 Dim node   
 Dim attr ,attrs
 Dim ObjXmlDoc 

        Set ObjXmlDoc = CreateObject("MSXML2.DOMDocument.3.0")
       'Create/open the disconnected recordset
  ObjXmlDoc = objXMLDoc2
  Set node = objXMLDoc.selectSingleNode("//AddressObject/")
    If( Not node Is Nothing) Then 
        Set rsReturn = CreateObject("ADODB.Recordset.6.0")

        Set attrs = node.getAttributes()
     for Each attr In attrs
      rsReturn.Fields.Append attr.nodeName, adVarWChar, 255
     Next 

     rsReturn.CursorLocation = adUseClient
     rsReturn.CursorType = adOpenStatic
     rsReturn.LockType = adLockOptimistic
     rsReturn.Open
    Set node = Nothing
     'Loop/add rows
     For Each node In objXMLDoc.selectNodes("//AddressObject/")
      rsReturn.AddNew
       For Each attr In node.Attributes
         If(Not rsReturn(attr.nodeName)Is NOTHING) Then
        rsReturn(attr.nodeName) = 1'attr.nodeValue
        End if
       Next  
     Next 

     If rsReturn.RecordCount <> 0 Then rsReturn.MoveFirst

   'cExit:
   End If 
   'Dispose DOM document
   Set objXMLDoc = Nothing

   Set XMLToRecSet = rsReturn
   Set rsReturn = Nothing

End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:09:27+00:00Added an answer on May 17, 2026 at 11:09 pm

    Ado cannot handle an xml recordset. I think you need to use the old XML parser to get the data out. You could throw it into a db and then use ado to manipulate the data once its in a database.

    Classic asp makes it very hard to work with Soap web services. I would strongly suggest coding this portion of your application in ASP.net ..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation as below in which I need to pass a C-style
I have a situation like below in which I have some problem in freeing
I have a situation in which text in one of the cells is massive.When
I have a situation where I need to create a 'master object' instance by
I have a situation where I need to display ItemID and ItemName from Items
I have this situation: web application with cca 200 concurent requests (Threads) are in
Sorry I missed and deleted earlier question on accident again. I have a situation,
I have a situation where i want to copy the text from UILabel as
I have a situation where I have two arrays and I use one array(A)
I have a situation with my app. Suppose I have 6 users, each user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.