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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:14:51+00:00 2026-06-13T07:14:51+00:00

I am trying to pull data from my XML sheet, this is the first

  • 0

I am trying to pull data from my XML sheet, this is the first time i have done this fyi.

Here is my jQuery.

    $(document).ready(function(){
        $.ajax({
            type: "GET",
            url: "desk.xml",
            dataType: "xml",
            success: function(xml) {
                $(xml).find('desk').each(function(){
                    var id = $(this).attr('id');
                    var desknum = $(this).find('desk#').text();
                    var phonenum = $(this).find('phone#').text();
                    var emailinfo = $(this).find('email').text();
                    $('<div class="desks" id="desk_'+id+'"></div>').html().appendTo('#page-wrap');
                        $('<div class="desknum"></div>').html(desknum).appendTo('#desk_'+id);
                        $('<div class="phonenum"></div>').html(phonenum).appendTo('#desk_'+id);
                        $('<div class="emailinfo"></div>').html(emailinfo).appendTo('#desk_'+id);
                });
            }
        });
    });

Here is my XML

<?xml version="1.0" encoding="iso-8859-1"?>
 <location>
   <desk id="1">
      <desk#>Camaron</desk#>
   <computer#>COR9838L</computer#>
<phone#>111.111.1111</phone#>
<email#>camaron@yahoo.com</email#>
<picture></picture>
  </desk>
  <desk id="2">
   <desk#>Greg</desk#>
<computer#>COR9838L</computer#>
<phone#>111.111.1111</phone#>
<email>camaron@yahoo.com</email>
<picture></picture>
  </desk>
  <desk id="3">
<desk#>Cesar</desk#>
<computer#>COR9838L</computer#>
<phone#>111.111.1111</phone#>
<email#>camaron@yahoo.com</email#>
<picture></picture>
   </desk>
  <desk id="4">
   <desk#>Tracy</desk#>
<computer#>COR9838L</computer#>
<phone#>111.111.1111</phone#>
<email#>camaron@yahoo.com</email#>
<picture></picture>
  </desk>
</location>

I also setup a jsfiddle here http://jsfiddle.net/cornelas/Re6Nv/

Not sure why its not working.

Also I want to instead of creating a div id, i want my xml data to load to a correct div id. Just to give you an idea of what my plan is, i am building a location based format each desk will have an id on a map, the xml should point to the location on the map and place the data correctly. This is a big project so any help you can offer is greatly appreciated.

  • 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-06-13T07:14:52+00:00Added an answer on June 13, 2026 at 7:14 am

    Your desk.xml returns a 500 Internal Server Error, also I suggest you use this code once your XML file is accessible.

    $.get('http://www.designsbycamaron.net/desk.xml', function(data){
    
        $(data).find('desk').each(function(){
    
            var $desk = $(this); 
            var id = $desk.attr("id");
            var desknum = $desk.find('desk#').text();
            var phonenum = $desk.find('phone#').text();
            var emailinfo = $desk.find('email').text();
    
            var html = '<div class="desks" id="desk_' + id + '">';
            html += '<div class="desknum">' + desknum + '</div>';
            html += '<div class="phonenum">' + phonenum + '</div>'; 
            html += '<div class="emailinfo">' + emailinfo + '</div></div>'; 
    
            $('#page-wrap').append($(html));
    
        });
    
    });​
    

    http://jsfiddle.net/Re6Nv/6/

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

Sidebar

Related Questions

I'm using javascript to pull data returned from an XML document. Inside this XML
I am trying to pull out data from an XML document that seems to
I'm trying to pull some data from a webpage. I have it partially working,
So I have three tables I am trying to pull data from with the
I have a small issue. I am trying to pull some data from my
Ive been trying to pull data from an xml file but i keep getting
I am trying to pull down xml content from the server using jQuery.post() in
I am trying to pull data from a website using objective-c. This is all
I have a php script that I'm trying to pull some data from a
I'm trying to pull data from my database using json in php. I have

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.