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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:21:53+00:00 2026-05-15T11:21:53+00:00

Trying to do a basic XML retrieval. The code works as expected in Firefox

  • 0

Trying to do a basic XML retrieval. The code works as expected in Firefox and Opera, meaning it alerts with the text value of the “title” node from the XML document. But in IE7, I am getting “object required” from this line.

  x=xhttp.responseXML.getElementsByTagName("title")[0].childNodes[0].nodeValue;
  alert(x);

Btw, it was working fine with responseText (and a txt file). But I had to use ActiveX Object to get that working in IE…strange b/c I thought it supported the XMLHttprequest object. Maybe this has something to do with it?

[edit]

ok I replaced the line with this

    x=xhttp.responseXML.childNodes.length;
    alert(x);

in FF there are 2 nodes, in IE there are 0. So obviously it can’t read 0 childNodes. Has something to do with whitespace, I guess? What gives?

[update]

It is all related to my ignorance of how to use msxml.DOMDocument and Msxml.XMLHTTP ActiveXObjects. I am learning about these Objects at the following link:

Program with DOM in JScript

and will answer my question in a few days…

  • 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-15T11:21:54+00:00Added an answer on May 15, 2026 at 11:21 am

    I figured it out. I didn’t mention that so far I am developing this out of folders on my hard drive. That was the problem. I would like to quote “Ultimator” whose answer I discovered on webdeveloper.com at this thread: http://www.webdeveloper.com/forum/showthread.php?t=147342

    IE7’s native XMLHttpRequest is powerless even to a file in the same directory, yet, in the same situation, ActiveX would be able to serve IE7 normally.
    The reason is because IE7’s XMLHttpRequest object is limited to the web.
    Hence your “access denied in IE7” error since IE7 in your code is being served via XMLHttpRequest rather than ActiveX.
    Firefox’s XMLHttpRequest object, on the other hand, allows both local requests as well as requests on the web.

    Actually, I don’t even understand why the object required was happening. For a while I switched to using only the msxml.DOMDocument.3.0 Object, and I got that working locally. Then I kept reading about how XMLHttpRequest was supported in IE7, so I went back to working on that object. After reading through tutorials on MSDN, I noticed they suggested to create a “virtual directory” and use the files on

    http://localhost.
    

    Then I had the idea, well why can’t I just point the Request to somewhere on the internet? And I did: to a sample XML file on w3schools. Guess what? It worked in IE7 and I was able to pull the text I wanted with selectSingleNode. But in Firebug it said, xmlDoc.responseXML is null. Interesting…

    So ultimately I decided to activate IIS on my machine (I have Vista Home Premium) and use the localhost. It worked! FF, IE, Chrome and Opera accessed the files the same way. So the lesson I learned is: you can use localhost to simulate the behavior of a server, which is useful when developing locally.

    With FF not accessing the remote file, and IE being able to access it, I don’t really get that…oh well for now my problem is solved, I will report back with future frustrations. Thanks for reading!

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

Sidebar

Ask A Question

Stats

  • Questions 427k
  • Answers 427k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should be able to theme the imagecache function and… May 15, 2026 at 12:48 pm
  • Editorial Team
    Editorial Team added an answer IMHO, a REST interface encoded in JSON will be easier… May 15, 2026 at 12:48 pm
  • Editorial Team
    Editorial Team added an answer Why you don't use Leiningen? It's much easier to use… May 15, 2026 at 12:48 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.