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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:33:37+00:00 2026-05-16T18:33:37+00:00

Ok So I looked at this: Using jQuery to extract CDATA in XML for

  • 0

Ok So I looked at this: Using jQuery to extract CDATA in XML for use as HTML content

But it didn’t help with what I’m doing. I’m getting an rss/xml feed from a url. I’m having an issue with the CDATA in the title and description tag. Here’s the feed item:

  <item>
   <title><![CDATA[Impact South Africa (Girls)]]></title>
   <link>http://www.thriveafricastore.com/products.php?product=Impact-South-Africa-%28Girls%29</link>
   <pubDate>Mon, 29 Mar 2010 19:02:26 +0000</pubDate>
   <guid isPermaLink="false">http://www.thriveafricastore.com/products.php?product=Impact-South-Africa-%28Girls%29</guid>
   <description><![CDATA[<div style='float: right; padding: 10px;'><a href="http://www.thriveafricastore.com/products.php?product=Impact-South-Africa-%28Girls%29"  ><img src="http://www.thriveafricastore.com/product_images/t/266/girls__27047_thumb.jpg" alt="" /></a></div><p><strong>You can help us impact South Africa. Do something!<br /></strong></p>
<p>Your basic jersey tee, only better! Made just for women, it contours to your shape and always looks flattering and chic even with a simple pair of jeans. This is one t-shirt you'll want to stock pile. Pre-shrunk 1..<p><strong>Price: <span class="SalePrice">$10.00</span></strong> </p>]]></description>
   <content:encoded><![CDATA[<div style='float: right; padding: 10px;'><a href="http://www.thriveafricastore.com/products.php?product=Impact-South-Africa-%28Girls%29"  ><img src="http://www.thriveafricastore.com/product_images/t/266/girls__27047_thumb.jpg" alt="" /></a></div><p><strong>You can help us impact South Africa. Do something!<br /></strong></p>
<p>Your basic jersey tee, only better! Made just for women, it contours to your shape and always looks flattering and chic even with a simple pair of jeans. This is one t-shirt you'll want to stock pile. Pre-shrunk 1..<p><strong>Price: <span class="SalePrice">$10.00</span></strong> </p>]]></content:encoded>
  </item>

And here’s the jQuery I have so far:

   $.get('http://www.thriveafricastore.com/rss.php?type=xml', {}, function(d) {

     $('body').append('New Thrive Store Items'); 
     $('body').append('<div>');

    $('item', d).each(function() {

     var $item = $(this);
     var title = $item.find('title');
     var description = $item.find('description').text();
     var link = $item.find('link');
     var html = '<h3><a href="' + link + '">' + title + '</a></h3>';

     $('div').append($(html));

    });
   }, 'xml');

Any ideas on my next stop to removing the CDATA tag so I can just pull the content out?

Thanks so much!

  • 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-16T18:33:37+00:00Added an answer on May 16, 2026 at 6:33 pm

    Actually I just tried something and it worked. I added .text() to the title and the link variable like so:

                var title = $item.find('title').text();
                var description = $item.find('description').text();
                var link = $item.find('link').text();
    

    and it worked just fine.

    Thanks!

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

Sidebar

Related Questions

I looked for this but i found how to use it with ScrollTo. This
I've looked over the internet and found some instructions for this question: Using jQuery
I'm using JQuery UI tabs loading content via ajax like this: $('#tabsElem').tabs({ajaxOptions:{cache:false}, cache:true); Consider
I am currently using this JQuery datepicker from http://www.eyecon.ro/datepicker/ . I have looked through
I have looked at this example using php and GD to piecewise-render a spiral
This looked like a very simple question but I couldn't find the answer. How
I looked at this: Returning values from nested functions in Javascript but it did
I've looked at this question: Select first instance only with XPath? But if I
I just looked at this posting: What is the best or most interesting use
I have looked at this page for some time now. Amazing, really. But I

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.