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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:16:59+00:00 2026-05-29T08:16:59+00:00

Hi guys I’m trying to parse an xml document using jquery but i keep

  • 0

Hi guys I’m trying to parse an xml document using jquery but i keep hitting a limitation or so i think. When a node has muliple child nodes i only get the first node. let me show an example.

  <sheetData>
   <row r="1" spans="1:2" x14ac:dyDescent="0.25">
    <c r="A1" t="s">
    <v>0</v>
    </c>
     <c r="B1" t="s">
   <v>1</v>
 </c>

i use the following code to try to parse this data but it only get the first attribute i dont know what im doing wrong . here is the code.

       $(xml).find("row").each(function(i) {
        v1 =  $(this).find("c").attr("r");

i should end up with A1 and B1 but im only getting the A1. Any ideas suggestion I would be forever greatful

  • 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-29T08:17:00+00:00Added an answer on May 29, 2026 at 8:17 am

    attr method will only get the attribute value of the first element from the matched set of elements. If you want it for all elements then use each or some other loop and get the attribute value from each element. Try this.

      $(xml).find("row").each(function(i) {
          var attrs = [];
          v1 =  $(this).find("c").each(function(){
              attrs.push($(this).attr("r"));
          });
    
          //Now attrs will contain both A1 and B1 attribute values.
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Guys, I'm trying to finish up my homework but I'm having some problems here
Guys, I have a CSS Layout that I am using that has a header,
guys, I want to parse a xml in android which is got by HTTPPost
Guys lease help me out I think I'm close, but I'm missing something. Background
guys, I'm trying to realize viewing comments on internet portal and I'm using UITableView.
Guys, I’ve been writing code for 15+ years, but managed to avoid Web Development
Guys, I am using SQL Server 2000 and executing the sp_columns stored procedure to
guys which text editor is good for Rubyonrails? i m using Windows and i
Guys, I am using dynamic programming approach to solve a problem. Here is a
Guys, I'm trying to write xpath or css to find/click on list element All

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.