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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:52:58+00:00 2026-06-10T05:52:58+00:00

I’ve got two rss feeds I would like to merge together to make one.

  • 0

I’ve got two rss feeds I would like to merge together to make one. I’ve actually managed to merge the two feeds together and place the items in correct place – however the data in each attribute, i.e. title contains title+link+description+author+pubDate – and that repeats for link, description, author and pubdate. Can someone help me dubug it please?

    Object rssData = new object();
    Cms.UI.CommonUI.ApplicationAPI AppAPI = new Cms.UI.CommonUI.ApplicationAPI();
    rssData = AppAPI.ecmRssSummary(50, true, "DateCreated", 0, "");

    Response.ContentType = "text/xml";
    Response.ContentEncoding = System.Text.Encoding.UTF8; 

    XmlDocument xmlDocument = new XmlDocument();

    xmlDocument.LoadXml(rssData.ToString());


    //************************************************************
    // Obtain 5 data items from second list

    Object rssData1 = new object();
    Cms.UI.CommonUI.ApplicationAPI AppAPI1 = new Cms.UI.CommonUI.ApplicationAPI();
    rssData1 = AppAPI1.ecmRssSummary(60, true, "DateCreated", 5, "");

    XmlDocument xmlDocument1 = new XmlDocument();

    xmlDocument1.LoadXml(rssData1.ToString());


    XmlNodeList nl = xmlDocument1.SelectNodes("/rss/channel");
    XmlNode root = nl[0]; //do I need this line?

    foreach (XmlNode xnode1 in root.ChildNodes)
    {
        string title = xnode1.InnerText;
        string link = xnode1.InnerText;
        string desc = xnode1.InnerText;
        string auth = xnode1.InnerText;
        string pdate = xnode1.InnerText;

        //Merge new nodes

        node = xmlDocument.CreateNode(XmlNodeType.Element, "item", null);
        //node.InnerText = "this is new node";

        //create title node
        XmlNode nodeTitle = xmlDocument.CreateElement("title");
        nodeTitle.InnerText = title;

        //create Link node
        XmlNode nodeLink = xmlDocument.CreateElement("link");
        nodeLink.InnerText = link;

        XmlNode nodeDesc = xmlDocument.CreateElement("description");
        nodeDesc.InnerText = desc;

        XmlNode nodeAuthor = xmlDocument.CreateElement("author");
        nodeAuthor.InnerText = auth;

        XmlNode nodepubDate = xmlDocument.CreateElement("pubDate");
        nodepubDate.InnerText = pdate;


        //add to parent node
        node.AppendChild(nodeTitle);
        node.AppendChild(nodeLink);
        node.AppendChild(nodeDesc);
        node.AppendChild(nodeAuthor);
        node.AppendChild(nodepubDate);

        //add to elements collection
        //xmlDocument.DocumentElement.AppendChild(node);
        xmlDocument.DocumentElement.SelectNodes("/rss/channel")[0].AppendChild(node);
    }

    //********************************************

    xmlDocument.Save(Response.Output);
  • 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-10T05:53:00+00:00Added an answer on June 10, 2026 at 5:53 am

    As you rightly suspected, the problem is here:

    string title = xnode1.InnerText;
    string link = xnode1.InnerText;
    string desc = xnode1.InnerText;
    string auth = xnode1.InnerText;
    string pdate = xnode1.InnerText;
    

    No wonder that

    the data in each attribute, i.e. title contains
    title+link+description+author+pubDate – and that repeats for link,
    description, author and pubdate.

    You need to read the values of specific subelements of each node. Probably something like:

    string title = xnode1["title"].InnerText;
    

    etc.

    See http://www.csharp-examples.net/xml-nodes-by-name/ for reference.

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

Sidebar

Related Questions

I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

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.