---
title: "how to read custom element from RSSFeed XML"  
description: "how to read custom element from RSSFeed XML"  
author: "Anonymous User"  
published: 2014-09-02  
updated: 2014-09-03  
canonical: https://www.mindstick.com/forum/2236/how-to-read-custom-element-from-rssfeed-xml  
category: "xml"  
tags: ["xml"]  
reading_time: 1 minute  

---

# how to read custom element from RSSFeed XML

I want to read [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) from a [XMl file](https://www.mindstick.com/forum/360/how-to-read-xml-file-in-php) which is in a predefined [format](https://www.mindstick.com/forum/162083/how-to-convert-ost-files-into-pst-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](https://www.mindstick.com/articles/12860/how-to-get-financing-for-salvage-title-cars) [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) perfectly but I [am unable](https://answers.mindstick.com/qa/95314/how-do-i-access-a-group-link-in-telegram-if-i-am-unable-to-access-the-link) to get the value of ID This is a [custom](https://www.mindstick.com/blog/12298/use-custom-writing-services-to-get-through-the-finals) tag in the XMl

Can [anyone](https://www.mindstick.com/articles/23207/how-to-find-the-best-fit-job-for-anyone) [suggest me](https://www.mindstick.com/interview/23114/can-you-suggest-me-few-top-directory-submission-site) How to do this?

## Replies

### Reply by Sumit Kesarwani

Hi Chintoo, \
try 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 : "";


---

Original Source: https://www.mindstick.com/forum/2236/how-to-read-custom-element-from-rssfeed-xml

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
