何となく Blog by Jitta
Microsoft .NET 考

目次

Blog 利用状況
  • 投稿数 - 761
  • 記事 - 18
  • コメント - 32979
  • トラックバック - 222
ニュース
  • IE7以前では、表示がおかしい。div の解釈に問題があるようだ。
    IE8の場合は、「互換」表示を OFF にしてください。
  • 検索エンジンで来られた方へ:
    お望みの情報は見つかりましたか? よろしければ、コメント欄にどのような情報を探していたのか、ご記入ください。
It's ME!
  • はなおか じった
  • 世界遺産の近くに住んでます。
  • Microsoft MVP for Visual Developer ASP/ASP.NET 10, 2004 - 9, 2011
広告

記事カテゴリ

書庫

日記カテゴリ

ギャラリ

その他

わんくま同盟

同郷

 

ふと思ったこと。

@IT 内 Insider.NET にある Insider.NET 会議室 ディレクトリって、探したい対象のカテゴリがわかっている場合、便利です。でも、新しい会議室の方には対応していません。

じゃぁ、自分で作っちまおうか?

でも、どうやって「新着情報」を知る???

そうか、RSS があるじゃないか!最近、質問掲示板でも RSS が配信されるものが多いから、RSS を拾って更新のあったものを自分で分類していけばいいやん!!かつ、ブログだろうがニュースだろうが、何でも登録できちゃうぜ!!

ってことで、RSS を調べた。したら、最初のバージョンが 0.9 だったらしい。次のバージョンが 0.91 で、ここからよりシンプルになることを目指した 2.0 と、0.9 を継承した 1.0 に分かれているらしい。

さらに、マイクロソフト ソーシャルは、Atom って奴で配信されている。ってことで、ひとまとめに RSS といわれている XML ファイルには、(0.9, 0.91, 1.0)と、(2.0)と、(Atom)の3つのフォーマットがあることがわかった。

う~ん。。。とりあえず、こんな感じか?

  1. RSS を取得する URL を、ユーザーが指定する。
  2. 複数ある URL を定期的に巡回する。
  3. XML の階層を調べて、フォーマットを特定する。
  4. フォーマットによって、配信された記事をばらす。
  5. 記事 ID を持っているものはそれを、持っていない場合はリンク先 URL をキーにして重複チェックを行う。
  6. 新しいものについて、「新着」として登録する。
  7. それぞれの記事を、人手で「分類」に分ける。
  8. 「分類」ごとに、HTML、または XML ファイルを作る。
  9. FTP ソフトなどで、HTML または XML を HTTP サーバーにアップする。

RSS を取ってくる方法は、VS2008 のサンプルの中にあるので、ドキュメントを「RSS」でキーワード サーチしてください。そのサンプルでは、.NET Framework が対応している、RSS 2.0 が扱えます。「はてな」が配信しているのは RSS 1.0 なので、そのままでは使えません。また、マイクロソフト ソーシャルが提供しているのは Atom なので、やはり使えません。

とりあえず、どのフォーマットか見分ける方法。

  • RDF Site Summary (RSS) 1.0
    ここを見ると、RSS 1.0 のトップ レベル要素は "rdf:RDF" であるとわかる。

  • RSS 2.0 Specification
    ここを見ると、RSS 2.0 のトップ レベル要素は "rss" であるとわかる。

  • The Atom Syndication Format
    ここを見ると、Atom Syndication Format のトップ レベル要素は "atom:feed" であるとわかる。

このことから、トップ レベル要素のローカル名を見て判断すればよいでしょう。


static public string WhichFormat(XDocument document) {
    var root = document.Root;
    if (string.Compare(root.Name.LocalName, "feed", true) == 0) {
        return "ATOM";
    } else if (string.Compare(root.Name.LocalName, "rdf", true) == 0) {
        return "RSS10";
    } else if (string.Compare(root.Name.LocalName, "rss", true) == 0) {
        return "RSS20";
    } else {
        return "UNKNOWN";
    }
}

で、次は、データの設計かな。

つーか。。。@IT の会議室、RSS 配信してないし。。。

あ。。。大文字小文字の区別をしないようにしたけど、XML って、識別するやんorz

さらに。RSS 1.0 にしろ 2.0 にしろ、バージョンアップしたらどうするよ?要るのは一部だけで、全部をパースするわけじゃないから、まいっか。

投稿日時 : 2009年6月4日 22:26
コメント
  • # re: RSS 2.0 って、RSS 1.0 の上位じゃないのね!
    倉田 有大
    Posted @ 2009/06/05 1:14
    RSSリーダーつくってみたいなーとおもって、種類があると聞いて、挫折した私がとおります。

    解析部分をつくってもらえれば、わたしがGUIを・・げふんげふん。
  • # re: RSS 2.0 って、RSS 1.0 の上位じゃないのね!
    Jitta
    Posted @ 2009/06/05 7:44
    倉田有大さん、コメントありがとうございます。

    仕様は、リンクの通りです。判別はできたので、仕様ごとにパーサーを作れば OK。要は item 要素です。
    私は、タイトルとリンクしか取り出しませんよ?
  • # re: RSS 2.0 って、RSS 1.0 の上位じゃないのね!
    aetos
    Posted @ 2009/06/05 11:54
    @IT新会議室のRSSは非公式なものだそうです。
    http://ap.atmarkit.co.jp/bbs/core/club_cafe/10071

    > ローカル名を見て判断すればよいでしょう。
    厳密には名前空間 URI も見た方がいいでしょう。

    > RSS といわれている XML ファイルには、(0.9, 0.91, 1.0)と、(2.0)と、(Atom)の3つのフォーマットがあることがわかった。

    これは好みの問題かもしれませんが、俺は Atom を RSS と呼びません。
    個人的には、Atom と RSS を総称する場合は「フィード」と呼びます。

    RSS には 0.92~0.94もあるようです。
    が、実際には 1.0 と 2.0 以外はほとんど見ません。
    また、ごく希にですが、Atom 0.3 というのもあります。
    RSS 1.1 というのも企画されたようですが、現状どうなっているのかわかりません。
  • # re: RSS 2.0 って、RSS 1.0 の上位じゃないのね!
    Jitta
    Posted @ 2009/06/06 16:23
    aetosさん、コメントありがとうございます。

    > @IT新会議室のRSSは非公式なものだそうです。
    非公式?「見つけちゃっても見なかったことにしてくれ」というのは、提供していない、ってことだと思いますけど?
    「非公式」というのは、hidoriさんが提供しているものではないかと思います。って、サービス切り替わったときに終わってるか。


    > RSS には 0.92~0.94もあるようです。
    ん~。。。(0.9, 0.91, 1.0) とか書かずに、「1.0系」「2.0系」「Atom系」としたほうがよかったですね。
  • # XDocument って、RSS 2.0 しか解析してくれないの?!
    何となく Blog by Jitta
    Posted @ 2009/06/08 22:38
    XDocument って、RSS 2.0 しか解析してくれないの?!
  • # PoctLewXec
    https://amzn.to/365xyVY
    Posted @ 2021/07/03 3:14
    Pretty! This was an incredibly wonderful article. Thanks for providing these details.
  • # MUrdcjSvOaaOH
    https://www.blogger.com/profile/060647091882378654
    Posted @ 2021/07/03 4:43
    Many thanks for sharing this excellent write-up. Very inspiring! (as always, btw)
  • # Hello! I know this is kinda off topic but I was wondering which blog platform are you using for this site? I'm getting sick and tired of Wordpress because I've had issues with hackers and I'm looking at alternatives for another platform. I would be awes
    Hello! I know this is kinda off topic but I was wo
    Posted @ 2021/07/12 17:59
    Hello! I know this is kinda off topic but I was wondering which
    blog platform are you using for this site? I'm getting sick and tired of Wordpress
    because I've had issues with hackers and I'm looking at
    alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.
  • # re: RSS 2.0 ???RSS 1.0 ?????????!
    where to get hydroxychloroquine
    Posted @ 2021/08/08 3:58
    cloraquinn https://chloroquineorigin.com/# what is hydrochloroquine
  • # Right here is the right webpage for anyone who wishes to understand this topic. You understand so much its almost hard to argue with you (not that I actually will need to…HaHa). You definitely put a new spin on a topic which has been written about for a
    Right here is the right webpage for anyone who wis
    Posted @ 2021/09/03 20:54
    Right here is the right webpage for anyone who wishes to understand this topic.
    You understand so much its almost hard to argue with you (not that I actually will need to…HaHa).
    You definitely put a new spin on a topic which has been written about for ages.

    Excellent stuff, just excellent!
  • # Right here is the right webpage for anyone who wishes to understand this topic. You understand so much its almost hard to argue with you (not that I actually will need to…HaHa). You definitely put a new spin on a topic which has been written about for a
    Right here is the right webpage for anyone who wis
    Posted @ 2021/09/03 20:55
    Right here is the right webpage for anyone who wishes to understand this topic.
    You understand so much its almost hard to argue with you (not that I actually will need to…HaHa).
    You definitely put a new spin on a topic which has been written about for ages.

    Excellent stuff, just excellent!
  • # Right here is the right webpage for anyone who wishes to understand this topic. You understand so much its almost hard to argue with you (not that I actually will need to…HaHa). You definitely put a new spin on a topic which has been written about for a
    Right here is the right webpage for anyone who wis
    Posted @ 2021/09/03 20:56
    Right here is the right webpage for anyone who wishes to understand this topic.
    You understand so much its almost hard to argue with you (not that I actually will need to…HaHa).
    You definitely put a new spin on a topic which has been written about for ages.

    Excellent stuff, just excellent!
  • # Right here is the right webpage for anyone who wishes to understand this topic. You understand so much its almost hard to argue with you (not that I actually will need to…HaHa). You definitely put a new spin on a topic which has been written about for a
    Right here is the right webpage for anyone who wis
    Posted @ 2021/09/03 20:57
    Right here is the right webpage for anyone who wishes to understand this topic.
    You understand so much its almost hard to argue with you (not that I actually will need to…HaHa).
    You definitely put a new spin on a topic which has been written about for ages.

    Excellent stuff, just excellent!
  • # Can you tell us more about this? I'd care to find out more details.
    Can you tell us more about this? I'd care to find
    Posted @ 2021/09/06 8:05
    Can you tell us more about this? I'd care to find out more details.
  • # Can you tell us more about this? I'd care to find out more details.
    Can you tell us more about this? I'd care to find
    Posted @ 2021/09/06 8:07
    Can you tell us more about this? I'd care to find out more details.
  • # Can you tell us more about this? I'd care to find out more details.
    Can you tell us more about this? I'd care to find
    Posted @ 2021/09/06 8:08
    Can you tell us more about this? I'd care to find out more details.
  • # Can you tell us more about this? I'd care to find out more details.
    Can you tell us more about this? I'd care to find
    Posted @ 2021/09/06 8:09
    Can you tell us more about this? I'd care to find out more details.
  • # I'm not sure where you're getting your info, but great topic. I needs to spend some time learning much more or understanding more. Thanks for fantastic info I was looking for this info for my mission. quest bars http://j.mp/3jZgEA2 quest bars
    I'm not sure where you're getting your info, but g
    Posted @ 2021/09/11 9:04
    I'm not sure where you're getting your info, but great topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for fantastic info I was looking for this info for my mission. quest bars http://j.mp/3jZgEA2 quest bars
  • # Hi there, I do believe your website may be having browser compatibility issues. When I take a look at your website in Safari, it looks fine however when opening in Internet Explorer, it has some overlapping issues. I simply wanted to give you a quick hea
    Hi there, I do believe your website may be having
    Posted @ 2021/10/26 7:13
    Hi there, I do believe your website may be having
    browser compatibility issues. When I take a look
    at your website in Safari, it looks fine
    however when opening in Internet Explorer, it has some overlapping issues.
    I simply wanted to give you a quick heads up! Apart from that, great website!
  • # Hi there, I do believe your website may be having browser compatibility issues. When I take a look at your website in Safari, it looks fine however when opening in Internet Explorer, it has some overlapping issues. I simply wanted to give you a quick hea
    Hi there, I do believe your website may be having
    Posted @ 2021/10/26 7:14
    Hi there, I do believe your website may be having
    browser compatibility issues. When I take a look
    at your website in Safari, it looks fine
    however when opening in Internet Explorer, it has some overlapping issues.
    I simply wanted to give you a quick heads up! Apart from that, great website!
  • # Hi there, I do believe your website may be having browser compatibility issues. When I take a look at your website in Safari, it looks fine however when opening in Internet Explorer, it has some overlapping issues. I simply wanted to give you a quick hea
    Hi there, I do believe your website may be having
    Posted @ 2021/10/26 7:15
    Hi there, I do believe your website may be having
    browser compatibility issues. When I take a look
    at your website in Safari, it looks fine
    however when opening in Internet Explorer, it has some overlapping issues.
    I simply wanted to give you a quick heads up! Apart from that, great website!
  • # Hi there, I do believe your website may be having browser compatibility issues. When I take a look at your website in Safari, it looks fine however when opening in Internet Explorer, it has some overlapping issues. I simply wanted to give you a quick hea
    Hi there, I do believe your website may be having
    Posted @ 2021/10/26 7:16
    Hi there, I do believe your website may be having
    browser compatibility issues. When I take a look
    at your website in Safari, it looks fine
    however when opening in Internet Explorer, it has some overlapping issues.
    I simply wanted to give you a quick heads up! Apart from that, great website!
  • # If you want to obtain a great deal from this post then you have to apply these strategies to your won website.
    If you want to obtain a great deal from this post
    Posted @ 2021/11/12 18:05
    If you want to obtain a great deal from this post then you have to apply
    these strategies to your won website.
  • # If you want to obtain a great deal from this post then you have to apply these strategies to your won website.
    If you want to obtain a great deal from this post
    Posted @ 2021/11/12 18:06
    If you want to obtain a great deal from this post then you have to apply
    these strategies to your won website.
  • # If you want to obtain a great deal from this post then you have to apply these strategies to your won website.
    If you want to obtain a great deal from this post
    Posted @ 2021/11/12 18:07
    If you want to obtain a great deal from this post then you have to apply
    these strategies to your won website.
  • # If you want to obtain a great deal from this post then you have to apply these strategies to your won website.
    If you want to obtain a great deal from this post
    Posted @ 2021/11/12 18:08
    If you want to obtain a great deal from this post then you have to apply
    these strategies to your won website.
  • # prednisone 10 mg brand name https://prednisonesnw.com/#
    steroids prednisone for sale
    Prednisone
    Posted @ 2021/11/13 9:45
    prednisone 10 mg brand name https://prednisonesnw.com/#
    steroids prednisone for sale
  • # I am really enjoying the theme/design of your web site. Do you ever run into any browser compatibility problems? A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera. Do you have any recomm
    I am really enjoying the theme/design of your web
    Posted @ 2021/11/13 15:39
    I am really enjoying the theme/design of your web site.
    Do you ever run into any browser compatibility problems?

    A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera.
    Do you have any recommendations to help fix this problem?
  • # I am really enjoying the theme/design of your web site. Do you ever run into any browser compatibility problems? A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera. Do you have any recomm
    I am really enjoying the theme/design of your web
    Posted @ 2021/11/13 15:39
    I am really enjoying the theme/design of your web site.
    Do you ever run into any browser compatibility problems?

    A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera.
    Do you have any recommendations to help fix this problem?
  • # I am really enjoying the theme/design of your web site. Do you ever run into any browser compatibility problems? A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera. Do you have any recomm
    I am really enjoying the theme/design of your web
    Posted @ 2021/11/13 15:40
    I am really enjoying the theme/design of your web site.
    Do you ever run into any browser compatibility problems?

    A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera.
    Do you have any recommendations to help fix this problem?
  • # I am really enjoying the theme/design of your web site. Do you ever run into any browser compatibility problems? A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera. Do you have any recomm
    I am really enjoying the theme/design of your web
    Posted @ 2021/11/13 15:41
    I am really enjoying the theme/design of your web site.
    Do you ever run into any browser compatibility problems?

    A handful of my blog readers have complained about my site not working correctly in Explorer but looks great in Opera.
    Do you have any recommendations to help fix this problem?
  • # Hey! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options for another platform. I would be fantastic if
    Hey! I know this is somewhat off topic but I was w
    Posted @ 2021/11/25 21:42
    Hey! I know this is somewhat off topic but I
    was wondering which blog platform are you using for this website?
    I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options
    for another platform. I would be fantastic if you could point me in the direction of a good platform.
  • # Hey! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options for another platform. I would be fantastic if
    Hey! I know this is somewhat off topic but I was w
    Posted @ 2021/11/25 21:43
    Hey! I know this is somewhat off topic but I
    was wondering which blog platform are you using for this website?
    I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options
    for another platform. I would be fantastic if you could point me in the direction of a good platform.
  • # Hey! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options for another platform. I would be fantastic if
    Hey! I know this is somewhat off topic but I was w
    Posted @ 2021/11/25 21:44
    Hey! I know this is somewhat off topic but I
    was wondering which blog platform are you using for this website?
    I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options
    for another platform. I would be fantastic if you could point me in the direction of a good platform.
  • # Hey! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options for another platform. I would be fantastic if
    Hey! I know this is somewhat off topic but I was w
    Posted @ 2021/11/25 21:45
    Hey! I know this is somewhat off topic but I
    was wondering which blog platform are you using for this website?
    I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options
    for another platform. I would be fantastic if you could point me in the direction of a good platform.
  • # buy careprost in the usa free shipping https://bimatoprostrx.com
    bimatoprost ophthalmic solution careprost
    Hksfnjkh
    Posted @ 2021/12/13 16:14
    buy careprost in the usa free shipping https://bimatoprostrx.com
    bimatoprost ophthalmic solution careprost
  • # Ridiculous quest there. What happened after? Take care!
    Ridiculous quest there. What happened after? Take
    Posted @ 2022/01/13 17:26
    Ridiculous quest there. What happened after?

    Take care!
  • # doxycycline without prescription https://doxycyline1st.com/
    doxycycline hyc
    Jusidkid
    Posted @ 2022/02/26 8:27
    doxycycline without prescription https://doxycyline1st.com/
    doxycycline hyc
  • # Heya i'm for the first time here. I came across this board and I find It really useful & it helped me out a lot. I hope to give something back and help others like you aided me.
    Heya i'm for the first time here. I came across th
    Posted @ 2022/03/23 3:36
    Heya i'm for the first time here. I came across this board and I find It really useful & it
    helped me out a lot. I hope to give something back and help others like you aided me.
  • # Heya i'm for the first time here. I came across this board and I find It really useful & it helped me out a lot. I hope to give something back and help others like you aided me.
    Heya i'm for the first time here. I came across th
    Posted @ 2022/03/23 3:37
    Heya i'm for the first time here. I came across this board and I find It really useful & it
    helped me out a lot. I hope to give something back and help others like you aided me.
  • # Heya i'm for the first time here. I came across this board and I find It really useful & it helped me out a lot. I hope to give something back and help others like you aided me.
    Heya i'm for the first time here. I came across th
    Posted @ 2022/03/23 3:38
    Heya i'm for the first time here. I came across this board and I find It really useful & it
    helped me out a lot. I hope to give something back and help others like you aided me.
  • # Heya i'm for the first time here. I came across this board and I find It really useful & it helped me out a lot. I hope to give something back and help others like you aided me.
    Heya i'm for the first time here. I came across th
    Posted @ 2022/03/23 3:39
    Heya i'm for the first time here. I came across this board and I find It really useful & it
    helped me out a lot. I hope to give something back and help others like you aided me.
  • # I feel this is one of the so much significant info for me. And i am glad studying your article. However want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D. Just right job, cheers
    I feel this is one of the so much significant info
    Posted @ 2022/03/23 18:32
    I feel this is one of the so much significant info
    for me. And i am glad studying your article. However
    want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D.

    Just right job, cheers
  • # I feel this is one of the so much significant info for me. And i am glad studying your article. However want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D. Just right job, cheers
    I feel this is one of the so much significant info
    Posted @ 2022/03/23 18:33
    I feel this is one of the so much significant info
    for me. And i am glad studying your article. However
    want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D.

    Just right job, cheers
  • # I feel this is one of the so much significant info for me. And i am glad studying your article. However want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D. Just right job, cheers
    I feel this is one of the so much significant info
    Posted @ 2022/03/23 18:33
    I feel this is one of the so much significant info
    for me. And i am glad studying your article. However
    want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D.

    Just right job, cheers
  • # I feel this is one of the so much significant info for me. And i am glad studying your article. However want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D. Just right job, cheers
    I feel this is one of the so much significant info
    Posted @ 2022/03/23 18:35
    I feel this is one of the so much significant info
    for me. And i am glad studying your article. However
    want to observation on some normal issues, The site style is ideal, the articles is in reality excellent : D.

    Just right job, cheers
  • # Hello to every body, it's my first pay a quick visit of this blog; this blog carries remarkable and actually fine information designed for visitors.
    Hello to every body, it's my first pay a quick vis
    Posted @ 2022/03/24 6:54
    Hello to every body, it's my first pay a quick visit
    of this blog; this blog carries remarkable and actually
    fine information designed for visitors.
  • # Hello to every body, it's my first pay a quick visit of this blog; this blog carries remarkable and actually fine information designed for visitors.
    Hello to every body, it's my first pay a quick vis
    Posted @ 2022/03/24 6:55
    Hello to every body, it's my first pay a quick visit
    of this blog; this blog carries remarkable and actually
    fine information designed for visitors.
  • # Hello to every body, it's my first pay a quick visit of this blog; this blog carries remarkable and actually fine information designed for visitors.
    Hello to every body, it's my first pay a quick vis
    Posted @ 2022/03/24 6:57
    Hello to every body, it's my first pay a quick visit
    of this blog; this blog carries remarkable and actually
    fine information designed for visitors.
  • # Hello to every body, it's my first pay a quick visit of this blog; this blog carries remarkable and actually fine information designed for visitors.
    Hello to every body, it's my first pay a quick vis
    Posted @ 2022/03/24 6:58
    Hello to every body, it's my first pay a quick visit
    of this blog; this blog carries remarkable and actually
    fine information designed for visitors.
  • # I visited several websites but the audio quality for audio songs existing at this web site is in fact wonderful.
    I visited several websites but the audio quality f
    Posted @ 2022/03/25 6:54
    I visited several websites but the audio quality for audio songs existing at this web site is in fact wonderful.
  • # xwjxnvywrdwp
    sfhizsxj
    Posted @ 2022/06/04 10:42
    https://erythromycinn.com/# erythromycin ointment dosage
  • # Dostinex https://allpharm.store/
    AllPharm
    Posted @ 2022/07/22 6:04
    Dostinex https://allpharm.store/
タイトル  
名前  
Url
コメント