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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:16:04+00:00 2026-05-24T00:16:04+00:00

If one must load and parse an XML resource from a user/PW-protected URL you

  • 0

If one must load and parse an XML resource from a user/PW-protected URL you cannot just use an MSXML DOM.Load() as far as I can tell. There is no place to specify the credentials.

Yet if you use XMLHTTPRequest to obtain and parse the resource into a DOM (via its .responseXML property) you have nowhere to specify a value for the .resolveExternals property.

This more or less works out when you use MSXML 3, 4, (or even 5) where it defaults to True, however in MSXML 6 it defaults to False:

resolveExternals Property:

In MSXML 3.0, MSXML 4.0, and MSXML 5.0 the default resolveExternals
value is True. In MSXML 6.0, the default setting is False.

If this property is set to False, no external includes and imports
will be resolved.

Is there a way around this that I am not seeing? Normally I need the externals resolved, especially when dealing with XSDs or WSDLs.

Or am I fooling myself, and perhaps .resolveExternals never applies when using XMLHTTPRequest (only DOM.Load() calls)?

  • 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-24T00:16:08+00:00Added an answer on May 24, 2026 at 12:16 am

    Have you tried something like this?

    xmlhttp.responseXML.resolveExternals = true; 
    xmlhttp.responseXML.setProperty("ProhibitDTD", false);
    

    The only thing is the solution may only work with MSXML XMLHTTP ActiveX object.

    Edit: here is a concrete sample with IE9:

    var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP.6.0");
    // var xmlhttp = new XMLHttpRequest();
    
    xmlhttp.open("GET", "sample.xml", false);
    xmlhttp.responseXML.async = false;
    xmlhttp.responseXML.resolveExternals = true;
    xmlhttp.responseXML.validateOnParse = false;
    xmlhttp.responseXML.setProperty("ProhibitDTD", false);
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readystate == 4 && xmlhttp.status == 200) {
             alert(xmlhttp.responseXML.xml);
        }
    }
    xmlhttp.send();
    

    sample.xml

    <!DOCTYPE data SYSTEM "sample.dtd"><data>&ent;</data>
    

    sample.dtd

    <!ENTITY ent "Hello world!">
    

    If you run the above cod with IE9, you’ll successfully get the entity resolved. However, if you switch to the commented out XMLHttpRequest, you will fail.

    PS: I thought you were talking about scripting inside IE, and there is a Trident native component called XMLHttpRequest which is quite different from XmlHttp ActiveX component. However, if you are referring to IXMLHttpRequest COM interface residing in MSXML6.DLL, you can translate the above code into C++ with ease.

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

Sidebar

Related Questions

From what I understand, in order to achieve MSMQ load-balancing, one must use a
In order to prevent a SQLite in-memory database from being cleaned up, one must
I show to user a list of categories, he must choose one. How to
I have one interesting problem. I must parse mail body (regular expression), get some
I'm working with an XML document where a tag must either have one set
How to take content from a div class one by one and then load
I'm currently writing a quick solution for Euler Problem #4 where one must find
I've found a task on some Java programming competition. One must create class Sentence
In a software system a one-to-one relationship must be modeled between two objects where
Would the following SQL statement automatically create an index on Table1.Table1Column, or must one

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.