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

  • Home
  • SEARCH
  • 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 7195755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:38:34+00:00 2026-05-28T20:38:34+00:00

I have a rowset coming back using the Microsoft rowset schema from my stock

  • 0

I have a rowset coming back using the Microsoft rowset schema from my stock control system.

However when using msxml2 to read the document I don’t seem to be able to access the data (Written in vbscript)

<xml>
    <s:schema>
        <!-- Schema here -->
    </s:schema>
    <rs:data>
        <z:row field="value" field1="value" />
    </rs:data>
</xml>

To pull this back I am using:

Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttp.open "POST", address, False
objXmlHttp.setRequestHeader "Content-Type", "text/xml"
objXmlHttp.Send strXml

Set objLst = XML_response.getElementsByTagName("data")
myValue = objLst.item(0).getAttribute("field")

However I am receiving the following message:

Microsoft VBScript runtime error '800a01a8'

Object required: 'objLst.item(...)' 

This is probably me doing something totally wrong, if so could someone point it out to me please because I have stared at this for 2 hours now and I can’t get it.

  • 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-28T20:38:35+00:00Added an answer on May 28, 2026 at 8:38 pm

    Given a table like:

    SELECT TOP 5 * FROM [actor.txt]
    ----------------------------------------------------------------
    |actor_id|first_name|last_name   |last_update         |
    |       1|PENELOPE  |GUINESS     |2/15/2006 4:34:33 AM|
    |       2|NICK      |WAHLBERG    |2/15/2006 4:34:33 AM|
    |       3|ED        |CHASE       |2/15/2006 4:34:33 AM|
    |       4|JENNIFER  |DAVIS       |2/15/2006 4:34:33 AM|
    |       5|JOHNNY    |LOLLOBRIGIDA|2/15/2006 4:34:33 AM|
    ----------------------------------------------------------------
    

    in an ADO (classic, tested with version 2.8) accessible database, you
    can save the resultset to XML using

      oRS.Save sFSpec, adPersistXML
    

    That gives you XML like:

    <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
        xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
        xmlns:rs='urn:schemas-microsoft-com:rowset'
        xmlns:z='#RowsetSchema'>
    <s:Schema id='RowsetSchema'>
        <s:ElementType name='row' content='eltOnly'>
            <s:AttributeType name='actor_id' rs:number='1' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                <s:datatype dt:type='i2' dt:maxLength='2' rs:precision='5' rs:fixedlength='true'/>
            </s:AttributeType>
            <s:AttributeType name='first_name' rs:number='2' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                <s:datatype dt:type='string' dt:maxLength='45'/>
            </s:AttributeType>
            <s:AttributeType name='last_name' rs:number='3' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                <s:datatype dt:type='string' dt:maxLength='45'/>
            </s:AttributeType>
            <s:AttributeType name='last_update' rs:number='4' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                <s:datatype dt:type='dateTime' rs:dbtype='variantdate' dt:maxLength='16' rs:fixedlength='true'/>
            </s:AttributeType>
            <s:extends type='rs:rowbase'/>
        </s:ElementType>
    </s:Schema>
    <rs:data>
        <z:row actor_id='1' first_name='PENELOPE' last_name='GUINESS' last_update='2006-02-15T04:34:33'/>
        <z:row actor_id='2' first_name='NICK' last_name='WAHLBERG' last_update='2006-02-15T04:34:33'/>
        <z:row actor_id='3' first_name='ED' last_name='CHASE' last_update='2006-02-15T04:34:33'/>
        <z:row actor_id='4' first_name='JENNIFER' last_name='DAVIS' last_update='2006-02-15T04:34:33'/>
        <z:row actor_id='5' first_name='JOHNNY' last_name='LOLLOBRIGIDA' last_update='2006-02-15T04:34:33'/>
    </rs:data>
    </xml>
    

    To read that data, start with (local, console) code like:

      Dim oFS    : Set oFS   = CreateObject( "Scripting.FileSystemObject" )
      Dim sDDir  : sDDir     = oFS.GetAbsolutePathName( "..\Data" )
      Dim sFSpec : sFSpec    = oFS.GetAbsolutePathName( "..\Data\actor.xml" )
      Dim oXDoc  : Set oXDoc = CreateObject("msxml2.domdocument")
      Dim sXPath, ndFnd, ndlFnd, attrX, nIdx
      oXDoc.async             = False
      oXDoc.validateOnParse   = False
      oXDoc.resolveExternals  = False
      oXDoc.setProperty "SelectionLanguage", "XPath"
      oXDoc.setProperty "SelectionNamespaces", Join( Array( _
          "xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'" _
        , "xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'" _
        , "xmlns:rs='urn:schemas-microsoft-com:rowset'" _
        , "xmlns:z='#RowsetSchema'" _
     ), " ")
      If oXDoc.load(sFSpec) Then
         WScript.Echo sFSpec, "looks good."
         For Each sXPath In Array( _
                  "/xml" _
                , "/xml/s:Schema" _
                , "/xml/rs:data" _
                , "/xml/rs:data/z:row[@actor_id=""2""]" _
             )
             WScript.Stdout.Write "|" & sXPath & "| => "
             Set ndFnd = oXDoc.selectSingleNode( sXPath )
             If ndFnd Is Nothing Then
                WScript.Stdout.WriteLine "not found"
             Else
                WScript.Stdout.WriteLine "found a(n) " & ndFnd.tagName
             End If
         Next
         WScript.Echo "-----------------------"
    
    '<rs:data>
    '   <z:row actor_id='1' first_name='PENELOPE' last_name='GUINESS' last_update='2006-02-15T04:34:33'/>
    '       ...
    '</rs:data>
         sXPath = "/xml/rs:data/z:row[@actor_id=""3""]"
         Set ndFnd = oXDoc.selectSingleNode( sXPath )
         If ndFnd Is Nothing Then
            WScript.Echo "|", sXPath, "| not found"
         Else
            For Each attrX In ndFnd.Attributes
                WScript.Echo attrX.Name, attrX.Value
            Next
         End If
         WScript.Echo "-----------------------"
    
         sXPath = "/xml/rs:data/z:row"
         Set ndlFnd = oXDoc.selectNodes( sXPath )
         If ndlFnd Is Nothing Then
            WScript.Echo "ndlFnd Is Nothing"
         Else
            If 0 = ndlFnd.Length Then
               WScript.Echo "ndlFnd is empty"
            Else
               For Each ndFnd In ndlFnd
                   WScript.Echo TypeName(ndFnd)
                   For Each attrX In ndFnd.Attributes
                       WScript.Echo "", attrX.Name, attrX.Value
                   Next
               Next
            End If
         End If
      Else
         WScript.Echo "Bingo!"
         WScript.Echo oXDoc.parseError.reason
      End If
    

    The important steps:

    • For developing/testing avoid the extra complexity of using a server;
      if cscript readxml.vbs succeeds, it’s easy to ‘port’ the working code
      to .asp (and deal with server specific problems separately)
    • Create an msxml2.domdocument
    • Configure it; especially copy the namespaces from the xml tag to the
      SelectionNamespaces
    • Load the file, check for errors
    • Specify your XPath expressions (carefully!, try to ‘translate’ XML from your sample to XPATH)
    • Check the results of .selectSingleNode() and .selectNodes()
    • Access the attributes holding the data
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a compilation error when using rowset of tuples with the latest soci
I have an XML file generated using javax.sql.rowset.WebRowSet.writeXml which looks like: <metadata> This section
I'm trying to parse xml from SharePoint service (lists) using jquery. I have XMLHttpRequest
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
I have the following xml: <RowSet> <Row> <Number>12345</Number> <Quantity>42</Quantity> </Row> <Row> <Number>12345</Number> <Quantity>12</Quantity> </Row>
I have test_scores table with following fields: Table schema: id (number) score1 (number) score2
I have an XML document that models this hierarchy of tasks: 1 Customer 1.1
I have two classes which both extend from SQL class like this: class SQL

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.