Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Notepad Clone using a Textbox (not RichTextBox) Find / Find Next Function help? Pin
BillWoodruff17-Mar-15 7:46
professionalBillWoodruff17-Mar-15 7:46 
GeneralRe: C# Notepad Clone using a Textbox (not RichTextBox) Find / Find Next Function help? Pin
BillWoodruff17-Mar-15 22:11
professionalBillWoodruff17-Mar-15 22:11 
GeneralRe: C# Notepad Clone using a Textbox (not RichTextBox) Find / Find Next Function help? Pin
Member 1153148717-Mar-15 23:49
Member 1153148717-Mar-15 23:49 
GeneralRe: C# Notepad Clone using a Textbox (not RichTextBox) Find / Find Next Function help? Pin
BillWoodruff18-Mar-15 17:01
professionalBillWoodruff18-Mar-15 17:01 
Questionhow to send any file from server to client in c# Pin
Member 1149066016-Mar-15 21:32
Member 1149066016-Mar-15 21:32 
AnswerRe: how to send any file from server to client in c# Pin
Eddy Vluggen16-Mar-15 23:27
professionalEddy Vluggen16-Mar-15 23:27 
AnswerRe: how to send any file from server to client in c# Pin
F-ES Sitecore16-Mar-15 23:40
professionalF-ES Sitecore16-Mar-15 23:40 
QuestionProblem parsing rss feed Pin
Member 1022623016-Mar-15 19:25
Member 1022623016-Mar-15 19:25 
I have a problem getting a string from a element from a rss feed.

i get error here:
C#
XmlNode sizeNode = xmlnode.SelectSingleNode("torrent:contentLength");


the code runs if i leave out that line. here is rest of it:
C#
private void button1_Click(object sender, EventArgs e)
    {
        var xmlDoc = new XmlDocument();
        xmlDoc.Load("movies.xml");

        var xmlNode = xmlDoc.SelectSingleNode("//rss/channel");
        var i = 0;
        foreach (XmlNode xmlnode in xmlNode)
        {

            XmlNode titleNode = xmlnode.SelectSingleNode("title");
            XmlNode categoryNode = xmlnode.SelectSingleNode("category");
            XmlNode dateNode = xmlnode.SelectSingleNode("pubDate");
            XmlNode sizeNode = xmlnode.SelectSingleNode("torrent:contentLength");

            if ((titleNode != null) && (dateNode != null) &&
                (categoryNode != null) && (sizeNode != null) )
            {
                DgvMain.Rows.Add();
                DgvMain.Rows[i].Cells[1].Value = titleNode.InnerText;
                DgvMain.Rows[i].Cells[2].Value = categoryNode.InnerText;
                DgvMain.Rows[i].Cells[3].Value = dateNode.InnerText;
                DgvMain.Rows[i].Cells[4].Value = sizeNode.InnerText;
                i++;
            }

        }


here is a part from xml file:

XML
  <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:torrent="http://xmlns.ezrss.it/0.1/">
<channel>
    <title>movies torrents RSS feed - KickassTorrents</title>
    <link>http://kickass.to/</link>
    <description>movies torrents RSS feed</description>
    <item>
        <title>Al Murray My Gaff My Rules 2003 Xvid Mp3.avi</title>

        <category>Movies</category>
      <author>http://kickass.to/user/Stull/</author>        <link>http://kickass.to/al-murray-my-gaff-my-rules-2003-xvid-mp3-avi-t10314315.html</link>
        <guid>http://kickass.to/al-murray-my-gaff-my-rules-2003-xvid-mp3-avi-t10314315.html</guid>
        <pubDate>Sat, 07 Mar 2015 00:27:56 +0000</pubDate>
        <torrent:contentLength>548352170</torrent:contentLength>
        <torrent:infoHash>EDBA9CB0942265440B3A0AC6FD70B39CD4384E54</torrent:infoHash>
        <torrent:magnetURI><![CDATA[magnet:?xt=urn:btih:EDBA9CB0942265440B3A0AC6FD70B39CD4384E54&dn=al+murray+my+gaff+my+rules+2003+xvid+mp3+avi&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fopen.demonii.com%3A1337]]></torrent:magnetURI>
        <torrent:seeds>1</torrent:seeds>
        <torrent:peers>1</torrent:peers>
        <torrent:verified>0</torrent:verified>
        <torrent:fileName>al.murray.my.gaff.my.rules.2003.xvid.mp3.avi.torrent</torrent:fileName>
        <enclosure url="http://torcache.net/torrent/EDBA9CB0942265440B3A0AC6FD70B39CD4384E54.torrent?title=[kickass.to]al.murray.my.gaff.my.rules.2003.xvid.mp3.avi" length="548352170" type="application/x-bittorrent" />
    </item>



I would appriciate any help..
AnswerRe: Problem parsing rss feed Pin
Pete O'Hanlon16-Mar-15 22:19
mvePete O'Hanlon16-Mar-15 22:19 
QuestionHow to call protected override void OnPaint(PaintEventArgs e) in another method in C# Pin
Member 1068390216-Mar-15 8:47
Member 1068390216-Mar-15 8:47 
AnswerRe: How to call protected override void OnPaint(PaintEventArgs e) in another method in C# Pin
Eddy Vluggen16-Mar-15 9:08
professionalEddy Vluggen16-Mar-15 9:08 
GeneralRe: How to call protected override void OnPaint(PaintEventArgs e) in another method in C# Pin
Member 1068390216-Mar-15 9:48
Member 1068390216-Mar-15 9:48 
Questionask about windorms and containers Pin
fsdsc216-Mar-15 4:56
fsdsc216-Mar-15 4:56 
AnswerRe: ask about windorms and containers Pin
OriginalGriff16-Mar-15 5:04
mveOriginalGriff16-Mar-15 5:04 
GeneralRe: ask about windorms and containers Pin
fsdsc216-Mar-15 11:21
fsdsc216-Mar-15 11:21 
GeneralRe: ask about windorms and containers Pin
fsdsc217-Mar-15 9:12
fsdsc217-Mar-15 9:12 
Questioncreate PPPoe connection in c# Pin
KARFER16-Mar-15 4:38
KARFER16-Mar-15 4:38 
AnswerRe: create PPPoe connection in c# Pin
OriginalGriff16-Mar-15 5:05
mveOriginalGriff16-Mar-15 5:05 
QuestionDoubt about netinventory Pin
Raghuraman.tm1916-Mar-15 1:32
professionalRaghuraman.tm1916-Mar-15 1:32 
AnswerRe: Doubt about netinventory Pin
OriginalGriff16-Mar-15 2:18
mveOriginalGriff16-Mar-15 2:18 
Questionwriting XML document in C# Pin
Member 436171315-Mar-15 22:03
Member 436171315-Mar-15 22:03 
AnswerRe: writing XML document in C# Pin
manchanx15-Mar-15 22:22
professionalmanchanx15-Mar-15 22:22 
AnswerRe: writing XML document in C# Pin
Eddy Vluggen16-Mar-15 1:28
professionalEddy Vluggen16-Mar-15 1:28 
AnswerRe: writing XML document in C# Pin
amagitech16-Mar-15 6:21
amagitech16-Mar-15 6:21 
AnswerRe: writing XML document in C# Pin
Gerry Schmitz16-Mar-15 12:55
mveGerry Schmitz16-Mar-15 12:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.