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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:14:26+00:00 2026-05-22T23:14:26+00:00

this is likely to endup being an easy fix so I’ll apologize in advance

  • 0

this is likely to endup being an easy fix so I’ll apologize in advance for wasting your time.
I have the following code:

$.ajax({
            url: "/room/" + $nodeid + "/rss.xml",
            dataType: "xml",
            success: function($xml){
                $($xml).find('node').each(
                    function(){
                        alert( $(this).attr('name') );

                    }
                );
            },
            failure: function(){
                alert('Ajax not responding!');
            }
        });

And I am trying to read the following xml:

<?xml version="1.0" encoding="UTF-8" ?><xml>
  <node>
    <Title name = 'Title'>Committtee Room 1</Title>
    <Theatre name = 'Theatre'>40</Theatre>
    <Classroom name = 'Classroom'>24</Classroom>
    <Boardroom name = 'Boardroom'>22</Boardroom>
    <Cabaret name = 'Cabaret'>24</Cabaret>

  </node>
</xml>

Can someone please enlighten me and tell me why my alert( $(this).attr('name') );
is not returning “Title”, “Theatre” etc

Thanks.

  • 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-22T23:14:26+00:00Added an answer on May 22, 2026 at 11:14 pm

    You’ve found the node element. This doesn’t a name attribute.

    You need to find the child elements of node instead:

    $($xml).find('node > *').each(
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is most likely not an easy one but here is the situation: I
,This question is likely subjective, but a lot of grid Javascript plugins have come
What I have is something similar to this: //method being called by thread pool
This likely applies to non MVC too. But, Is it possible to use the
This is likely by design for big teams with proper QA departments, but we
This is likely a stupid question but I always find myself wondering which is
I think this is likely to be a generic .NET assembly loading question, but
Ok so this is likely a ridiculously stupid question but I can't seem to
I know this is most-likely a simple question but when you restore a database
I realize that the answer to this question is likely quite obvious (if somewhat

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.