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 3303298
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:56:32+00:00 2026-05-17T20:56:32+00:00

I have the following ASP classic function: function get_children(n) dim local_array dim parent dim

  • 0

I have the following ASP classic function:

function get_children(n)
  dim local_array
  dim parent
  dim path
  if n.hasChildNodes() then
    for each child in n.childNodes
      local_array = array_merge(local_array, get_children(child))
    next
  else
    set parent = n.parentNode
    while isobject(parent)
      path = parent.nodeName & "/" & path
      set parent = parent.parentNode
    wend
    path = path & "/" & get_attr(n, "file")
    set_attr n, "path", path
    local_array = Array(0)
    set local_array(0) = n
  end if
  get_children = local_array
end function

Running this over an XML node (coming from a Microsoft.XMLDOM object), I get the error Object required: 'parent' on the line

path = parent.nodeName & "/" & path

and I can’t understand why. I’m checking isobject. Can anyone explain what the runtime is complaining about, and why?

  • 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-17T20:56:33+00:00Added an answer on May 17, 2026 at 8:56 pm

    When there is no more parent nodes, you will get a null value back, i.e. Nothing. However, Nothing is the “null object”, so it’s also an object. The value of IsObject(Nothing) is True.

    Check for Nothing instead of checking if the variable contains an object:

    while not (parent is Nothing)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have the following jscript code on a classic asp page, how do
I have the following shortened classic ASP code that makes a SQL insert call...
I have the following subroutine in a classic ASP class that calls the ADO
I am writing Classic ASP program.In one function, I have to use 2 update
I have the following JQuery code that worked perfect in C#/Asp.net 2.0 to call
I have the following button <asp:ImageButton ID=button1 runat=server ImageUrl=~/image.jpg CommandName = id CommandArgument =
I have the following code in my Site.Master page of an almost empty ASP.NET
I am working with ASP.NET doing some client side javascript. I have the following
I have ASP.Net code similar to the following (this is inside a FIELDSET): <ol>
I have an ASP.NET web application which does the following: Reads an Excel file.

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.