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
It didn't have a project and I removed myself as the assignee, now I
I didn't use NGen before but now I need to improve startup performance of
Didn't find any from their website. I mostly just trying to see which one
I didn't face this error before. I have a database db , that contains
I didn't design this table, and I would redesign it if I could, but
I didn't fully understand the concept of threads I have some questions. Assume we
I didn't change any setting of my Vim, but today the Backspace gets some
I didn't want to go through all the event unsubscription memory leak posts to
I didn't use subviews but painted my things with -drawRect: inside an UIView subclass.

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.