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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:28:33+00:00 2026-05-27T10:28:33+00:00

I am looking for an AJAX JavaScript library that supports namespaced xml. I read

  • 0

I am looking for an AJAX JavaScript library that supports namespaced xml.

I read dozens of posts on the web (including on stackoverflow) but didn’t find a good answer. There are many AJAX examples, but they break as soon as namespaces come into play (it is the case for example with jQuery selectors).

  • 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-27T10:28:34+00:00Added an answer on May 27, 2026 at 10:28 am

    I do not know exactly what you are calling an “AJAX JavaScript library” – making HTTP requests is a problem different from accessing nodes in a document tree.

    If you understand a library as “a collection of resources used to develop software” (Wikipedia), then, as part of the JSX library, I have written rather compatible¹ wrappers for XMLHttpRequest and namespace-aware DOM Level 3 XPath: http.js and xpath.js.

    http.js supports synchronous and asynchronous processing in the same way, and can even access the local filesystem (if permission is granted). Because JSX qualifies as a library then, you can use http.js and xpath.js either separately, with foreign code to complement either one, or together.

    You would use them together, for example, as follows. Suppose you had an XML document with resource name test.xml like

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soap:Body>
        <res:Response
            xmlns:res="http://domain.example/Response">
          <res:OUTPUT>
            <res:UNDO_COUNT>1.0</res:UNDO_COUNT>
            <res:MSG>Undo complete (No more to undo)</res:MSG>
          </res:OUTPUT>
        </res:Response>
        <res:OUTPUT
            xmlns:res="http://domain.example/Response">
          foo
        </res:OUTPUT>
      </soap:Body>
    </soap:Envelope>
    

    and you wanted to extract the 1.0 from its res:UNDO_COUNT element, you could write:

    <!-- 1. Include prerequisites and dependencies using Resource Builder (recommended) -->
    <script type="text/javascript" src="builder.php?src=object,string,http,xpath"></script>
    
    <script type="text/javascript">
      /*
       * 2. Construct the HTTP request wrapper; 
       *    the default is a GET request with asynchronous handling
       */
      var request = new jsx.net.http.Request("test.xml");
    
      /* 3. Prepare processing of the HTTP response */
      request.setSuccessListener(function (response) {
        /* 5. Get the reference to the XMLDocument object */
        var doc = response.responseXML;
    
        /* 6. Create the namespace resolver that fits your query best */
        var nsResolver = jsx.xpath.createFullNSResolver(null, doc);
    
        /* 7. Make the XPath query */
        var nodes = jsx.xpath.evaluate("//res:UNDO_COUNT/text()", doc, nsResolver);
    
        /*
         * 8. Process the result.  jsx.xpath.evaluate() returns a reference
         * to an Array instance if you do not specify the result type.
         */
    
        /* "1.0" */
        console.log(nodes[0].data);
      });
    
      /* 4. Make the HTTP request */
      request.send();
    </script>
    

    See also: Parsing XML / RSS from URL using Java Script

    ¹ A combination of JSX:object.js, http.js, and xpath.js has been tested positive in Gecko-, WebCore-, MSHTML-based and Opera browsers. However, JSX is mostly experimental code for now.

    Testcase, see script console

    Constructive feedback is welcome. In addition, JSX is free software. (You cannot do a checkout yet, but I am working on it.)

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

Sidebar

Related Questions

I'm looking for a JavaScript library for my web application. The application is very
I'm looking for a very small (one liner) Ajax JavaScript library to add on
I'm looking for a lightweight JavaScript AJAX library to consume WS REST through JSONP.
I'm building a Javascript/AJAX heavy web application using jQuery and I'm looking for a
Are there any existing AJAX/Javascript Date picker widgets/libraries that also allow you to select
I have an index.php file that loads other php files via this javascript/ajax code:
I am looking for a javascript(better if based on jquery) Ajax image viewer with
I am looking for a mature framework that can do Javascript mocking, especially on
I have a webpage that heavily uses Javascript (AJAX requests, Google Maps API, HTML
I am looking for a lightweight JavaScript library, for use in secure environments where

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.