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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:06:37+00:00 2026-06-03T08:06:37+00:00

When I didn’t have a class or anything my xml parsing was going through

  • 0

When I didn’t have a class or anything my xml parsing was going through and looping, but I’m now trying to style it using jquery mobile. I have to create the list this way so that the styles get applied by jquery after load. But it’s only loading the first result in the list. If i alert out $(this).text() I get 5 responses which is correct. But the following code isnt working.

$(document).ready(function() {

                             $.ajax({
                                    type: 'GET',
                                    url: 'test.xml',
                                    dataType: 'xml',
                                    success: function(xmlDoc) {
                                    var $xml = $(xmlDoc);
                                    $xml.find('FirstName').each(function() {
                                                                $("#list").html('<li ><a href="acura.html">' + $(this).text() + '</a></li>');
                                                                $("#list").listview('refresh');
                                                                });

                                    }
                                    });



            });

Heres the html:

 <body>
        <div data-role="page">

            <div data-role="header">
                <h1>Deep Web</h1>
            </div><!-- /header -->

           <ul id="list" data-role="listview"></ul><!-- /content -->

            <div data-role="footer">
                <h4>Footer content</h4>
            </div><!-- /footer -->

        </div>
    </body>
  • 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-03T08:06:39+00:00Added an answer on June 3, 2026 at 8:06 am
     $("#list").html('<li ><a href="acura.html">' + $(this).text() + '</a></li>');
    

    In here you are setting a new html in every loop,

    change it like this,

     $("#list").append('<li ><a href="acura.html">' + $(this).text() + '</a></li>');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I didn't find anything about parsing HTML in the XML::LibXML::Reader documentation. And I tried
Google didn't turn up anything that seemed relevant. I have a bunch of existing,
I didn't mean it to rhyme! But I need help. I have done some
Didn't find any from their website. I mostly just trying to see which one
I didn't design this table, and I would redesign it if I could, but
Concepts didn't make the C++0x standard, but Boost still provides The Boost Concept Check
I didn't have a understanding on difference between intializing a variable with {} and
I didn't realize this, but apparently Python's strftime function doesn't support dates before 1900:
i didn't really know how to title this question, but here's a thing that
I didn't fully understand the concept of threads I have some questions. Assume we

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.