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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:36:40+00:00 2026-05-26T07:36:40+00:00

I am using Xelement – Linq to XML to parse some an RSS feed.

  • 0

I am using Xelement – Linq to XML to parse some an RSS feed.

Rss Example:

    <item>
      <title>Waterfront Ice Skating</title>
      <link>http://www.eventfinder.co.nz/2011/sep/wellington/wellington-waterfront-ice-skating?utm_medium=rss</link>
      <description>&lt;p&gt;An ice skating rink in Wellington for a limited time only! 

Enjoy the magic of the New Zealand winter at an outdoor skating experience with all the fun and atmosphere of New York&amp;#039;s Rockefeller Centre or Central Park, ...&lt;/p&gt;&lt;p&gt;Wellington | Friday, 30 September 2011 - Sunday, 30 October 2011&lt;/p&gt;</description>
      <content:encoded><![CDATA[Today, Wellington Waterfront<br/>Wellington]]></content:encoded>
      <guid isPermalink="false">108703</guid>
      <pubDate>2011-09-30T10:00:00Z</pubDate>
      <enclosure url="http://s1.eventfinder.co.nz/uploads/events/transformed/190501-108703-13.jpg" length="5000" type="image/jpeg"></enclosure>
    </item>

Its all working fine but the description element has alot of html markup that I need to remove.

Description:

<description>&lt;p&gt;An ice skating rink in Wellington for a limited time only! 

    Enjoy the magic of the New Zealand winter at an outdoor skating experience with all the fun and atmosphere of New York&amp;#039;s Rockefeller Centre or Central Park, ...&lt;/p&gt;&lt;p&gt;Wellington | Friday, 30 September 2011 - Sunday, 30 October 2011&lt;/p&gt;</description>

Could anyone assist with this?

  • 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-26T07:36:41+00:00Added an answer on May 26, 2026 at 7:36 am

    If it is a RSSFeed why don’t you use System.ServiceModel.Syndication, the SyncicationFeed in combination with a XML reader will deal with your XmlEncoded issues

                using (XmlReader reader = XmlReader.Create(@"C:\\Users\\justMe\\myXml.xml"))
                {
                    SyndicationFeed myFeed = SyndicationFeed.Load(reader);
                    ...
                }
    

    Then remove HTML-Tags with regex as suggested by @nemesv, or use something like this

        public static string StripHTML(this string htmlText)
        {
            var reg = new Regex("<[^>]+>", RegexOptions.IgnoreCase);
            return HttpUtility.HtmlDecode(reg.Replace(htmlText, string.Empty));
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I parse an xml results from a webservice using linq : XElement items =
i am creating xml using linq.xml through xelement. my hirerachy is some thing like
I'm using Linq To XML new XElement(Prefix, Prefix == null ? : Prefix) but
I'm using Linq to XML to create a new XML file. Some part of
I'm populating an XElement with information and writing it to an xml file using
Can't seem to find how to appropriately parse this using XElement: <messages> <message subclass=a
I'm having some trouble using a combination of XElement and XslCompiledTransform . I've put
For some reason ToDictionary isn't working. I am using vs.net 2010 and 4.0 XElement
I am creating XML using Linq to XML and C#. It all works great
I'm using XDocument and XElement objects to write a large XML file (currently 8MB).

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.