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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:12:36+00:00 2026-05-30T02:12:36+00:00

I am trying to display some xml data from remote URL using jquery and

  • 0

I am trying to display some xml data from remote URL using jquery and ajax. In my xml, there are simply two elements to be accessed: title and url.

The structure of my xml file is as follows:

<list>
  <lists>
   <songs>
   <title>Pumped Up Kicks - Foster the people</title>       
   <url>http://dc249.4shared.com/img/970884399/8b9afc1d/dlink__2Fdownload_2Fmf4-        10b_5F_3Ftsid_3D20111122-112912-f675aa20/preview.mp3</url>
  </songs>
 </lists>
</list>

And I have the following jquery code:

$(document).ready(function () {
    $.ajax({
        type: "GET",
        url: "http://jeewanaryal.web44.net/SongsXML/nepaliSongs.xml",
        dataType: "xml",
        success: function (xml) {
            var items = parseXml(xml);
            doStuff(items);
        }
    });
});

function parseXml(xml) {
    var items = [];
    $(xml).find("songs").each(function () {
        items.push({
            name: $(this).find("title").text(),
            value: $(this).find("url").text()
        });
    });
    for (var i = 0; i < items.length; i++) {
        $(".phoneGapAPI").append(items[i].name + " <button class=\"newsDiv\" onclick=\"openChildBrowser(" + items[i].value + ");\">click here</button> <br> <br />");
    }
}

I can guess that I am doing wrong at the statement openChildBrowser("+items[i].value+");
How can I implement this? I need to pass the variable items[i].value inside the function openChildBrowser().
This code works fine displaying items[i].name but click here link does not let me to open that URL.

  • 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-30T02:12:37+00:00Added an answer on May 30, 2026 at 2:12 am

    Jquery failed to to render your Xml (Error : XML Parsing Error: no element found Location: moz-nullprincipal:{9e622e17-2e96-4a4d-95e4-6f7b95d0b4d8} Line Number 1, Column 1:) .Try to add version information to that xml file.

    like

    <?xml version="1.0" encoding="ISO-8859-1"?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a request using dojo.xhrGet to grab some XML data from
I'm trying to bind to some XML data from my WPF application. I've set
I am trying to parse some XML data to display in a basic web
Im pulling some data from an xml on a separate site and trying to
I am basically trying to retrieve some data from a MySql server, and display
i'm having some troubles trying to parse an XML file and display the results
I am trying to display xml data in html via XSLT. I am building
I'm trying to retrieve an webpage that has XML data using file_get_contents(). $get_url_report =
I am trying to simply display contents of a XML file in an HTML
I'm trying to include some (effectivly) static XML data in an HTML file, and

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.