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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:41:32+00:00 2026-05-31T11:41:32+00:00

I want to read data from a XMl file which is in a predefined

  • 0

I want to read data from a XMl file which is in a predefined format as given

<?xml version="1.0" encoding="utf-8"?>
 <rss version="2.0" xmlns:Poll="http://www.example.com">
 <channel>
 <title>Please Enter Title</title>
 <category>Please Enter Today's Voting Poll</category>
 <link>http://www.WebsiteURL.com</link>
<description>Please Enter Description</description>
<lastBuildDate>Fri, 09 Mar 2012 10:30:55 UT</lastBuildDate>
<item>
  <title>Topic Title</title>
  <Poll:ID>Poll Id</Poll:ID>
  <Poll:Answer1>answer</Poll:Answer1>
  <Poll:Date>Date</Poll:Date>
</item>

I an not able to read data that has Poll in the prefix of the element tag.

foreach (XmlNode RSSNode in RSSChannelItemList)
        {
            XmlNode RSSSubNode;
            RSSSubNode = RSSNode.SelectSingleNode("title");
            string title = RSSSubNode != null ? RSSSubNode.InnerText : "";
            XNamespace Tips = "http://www.example.com";
            RSSSubNode = RSSNode.SelectSingleNode("ID");
            string link = RSSSubNode != null ? RSSSubNode.InnerText : "";
            link = RSSSubNode!=null ? RSSSubNode.InnerXml : "";
        }

I get the title value perfectly but I am unable to get the value of ID
This is a custom tag in the XMl

Can anyone suggest me How to do 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-31T11:41:33+00:00Added an answer on May 31, 2026 at 11:41 am

    Go through this link
    View this Post
    this can be useful
    You just need to define a namespace and then use it like this

         XmlNamespaceManager nameSpace = new XmlNamespaceManager(doc.NameTable);
         nameSpace.AddNamespace("Tips", "http://www.example.com");
         RSSSubNode = RSSNode.SelectSingleNode("Tips:ID",nameSpace);
         string link = RSSSubNode != null ? RSSSubNode.InnerText : "";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to read data about MMORPG characters from a .txt file and then
I want to save data to xml file , which include Create xml file
i am using xml parser to read data from xml file. In this file
Example: I read data from an XML file. This data has unique id elements.
I have the following XML file with page nodes which I want to read
I want to read web service data from a website and display it into
I want to read both formatted text and binary data from the same iostream.
Read about Server push here . I want to push data to client from
i want simultaneously read and write data into file. Can i use StreamReader and
I want to read line n1->n2 from file foo.c into the current buffer. 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.