Swift XMLParserでCDATAをparseをする !編集途中読まないこと!

まずCDATAとは

 XMLはマークアップ言語であるため、XML文書を記述する際には、マークアップ用として指定された記号を直接文字として記述することができない。これを記述してもマークアップの指定と解釈され、文字として解釈されないためである。 しかし、マークアップ専用の記号であって、通常の文字として扱う特例的な部分をつくることができる。これを、CDATAセクションという。

CDATAセクションは、<![CDATA[という文字列で始まり、]]>という文字列で終わる。

CDATAセクションの中にはHTMLタグも埋め込むことができるので、RSSを配信している側にとっては便利。

でもXMLパーサーを回避するので、XML解析する側にとっては嫌な存在です。 ただ、XMLParserにはCDATAを解析するメソッドが用意されている。

引用 XML用語事典 [CDATAセクション]

(初心者向け)NSXMLParserでCDATAを解析する - Qiita

中身はbitコード。

ちなみにエンドポイントはこんなかんじ。

<?xml version="1.0" encoding="UTF-8"?><![CDATA[Apple Newsroom]]><![CDATAhttps://www.apple.com/jp/newsroom/]><![CDATA[2018-11-02T02:11:47.085Z]]><![CDATA[2018-11-02T02:11:47.085Z]]><![CDATA[Apple縲∫ャャ4蝗帛濠譛溘�讌ュ邵セ逋コ陦ィ]]><![CDATAhttps://www.apple.com/jp/newsroom/2018/11/apple-reports-fourth-quarter-results/]><![CDATA[Apple Newsroom]]><![CDATA[Apple縲∫ャャ4蝗帛濠譛溘�讌ュ邵セ逋コ陦ィ
螢イ荳企ォ倥′20��い繝��縲・PS縺ッ41��い繝��縺ィ縲�7縲�9譛域悄縺ョ譁ー險倬鹸繧帝#謌�

この中からtitleとid(リンク先)を取得したい。

まず普通にparseを始める。

    func startDownload() {
        self.items = []
        if let url = URL(
            string: "http://www.apple.com/jp/pr/feeds/pr.rss"){
            //インスタンスの生成
            if let parser = XMLParser(contentsOf: url) {
                self.parser = parser
                self.parser.delegate = self
    //これにより下記メソッドが呼ばれる
                self.parser.parse()
            }
        }
    }

ここで3つのメソッドがポイント

一つは、要素の開始ごとに呼ばれるメソッド

もう一つは、CDATAごとに呼ばれるメソッド

もう一つは、要素の終了ごとに呼ばれるメソッド

     //要素の開始タグごとに呼ばれる
    func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String])

// CDATAを見つけるごとに呼ばれる エンコードする必要があり
    func parser(_ parser: XMLParser, foundCDATA CDATABlock: Data) {

   //要素の終了ごとに呼ばれるメソッド
    func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?) {

エンドポイントを見ると、要素の開始タグの次にCDATAが来て、タイトルが入っている。そこで読み込みをしたい。 そのために読み込むかどうかを判断するbool型を宣言しておく。</p> <pre class="code lang-swift" data-lang="swift" data-unlink> <span class="synPreProc">var</span> <span class="synIdentifier">readOrNot</span><span class="synSpecial">:</span><span class="synType">Bool</span> <span class="synIdentifier">=</span> <span class="synConstant">false</span> <span class="synComment">//他のメンバ変数</span> <span class="synPreProc">var</span> <span class="synIdentifier">parser</span><span class="synSpecial">:</span><span class="synType">XMLParser</span><span class="synIdentifier">!</span> <span class="synPreProc">var</span> <span class="synIdentifier">items</span> <span class="synIdentifier">=</span> [Item]() <span class="synPreProc">var</span> <span class="synIdentifier">item</span><span class="synSpecial">:</span><span class="synType">Item</span>? <span class="synPreProc">var</span> <span class="synIdentifier">currentString</span><span class="synSpecial">:</span><span class="synType">String</span>? </pre> <p>これにより、CDATA部分で読み込むかどうかを判断させる方針とする。</p> <h4>これは上記要素の開始ごとに呼ばれるメソッドに記載する。</h4> <p>それによりCDATAの読み込み時に切り分けをする。 すべてのタグを読み込んだら大変なことになる。</p> <pre class="code" data-lang="" data-unlink> if elementName == "title" || elementName == "id" { readOrNot = true</pre> </div> <footer class="entry-footer"> <div class="entry-tags-wrapper"> <div class="entry-tags"> </div> </div> <p class="entry-footer-section track-inview-by-gtm" data-gtm-track-json="{"area": "finish_reading"}"> <span class="author vcard"><span class="fn" data-load-nickname="1" data-user-name="happy_teeth_ago" >happy_teeth_ago</span></span> <span class="entry-footer-time"><a href="https://happy-teeth.hatenablog.com/entry/2018/11/07/084951"><time data-relative datetime="2018-11-06T23:49:51Z" title="2018-11-06T23:49:51Z" class="updated">2018-11-07 08:49</time></a></span> <span class=" entry-footer-subscribe " data-test-blog-controlls-subscribe> <a href="https://blog.hatena.ne.jp/happy_teeth_ago/happy-teeth.hatenablog.com/subscribe?utm_medium=button&utm_source=blogs_entry_footer&utm_campaign=subscribe_blog"> 読者になる </a> </span> </p> <div class="hatena-star-container" data-hatena-star-container data-hatena-star-url="https://happy-teeth.hatenablog.com/entry/2018/11/07/084951" data-hatena-star-title="Swift XMLParserでCDATAをparseをする !編集途中読まないこと!" data-hatena-star-variant="profile-icon" data-hatena-star-profile-url-template="https://blog.hatena.ne.jp/{username}/" ></div> <div class="social-buttons"> <div class="social-button-item"> <a href="https://b.hatena.ne.jp/entry/s/happy-teeth.hatenablog.com/entry/2018/11/07/084951" class="hatena-bookmark-button" data-hatena-bookmark-url="https://happy-teeth.hatenablog.com/entry/2018/11/07/084951" data-hatena-bookmark-layout="vertical-balloon" data-hatena-bookmark-lang="ja" title="この記事をはてなブックマークに追加"><img src="https://b.st-hatena.com/images/entry-button/button-only.gif" alt="この記事をはてなブックマークに追加" width="20" height="20" style="border: none;" /></a> </div> <div class="social-button-item"> <div class="fb-share-button" data-layout="box_count" data-href="https://happy-teeth.hatenablog.com/entry/2018/11/07/084951"></div> </div> <div class="social-button-item"> <a class="entry-share-button entry-share-button-twitter test-share-button-twitter" href="https://twitter.com/intent/tweet?text=Swift+XMLParser%E3%81%A7CDATA%E3%82%92parse%E3%82%92%E3%81%99%E3%82%8B+!%E7%B7%A8%E9%9B%86%E9%80%94%E4%B8%AD%E8%AA%AD%E3%81%BE%E3%81%AA%E3%81%84%E3%81%93%E3%81%A8!+-+happy_teeth's+%E5%BF%98%E5%82%99%E9%8C%B2&url=https%3A%2F%2Fhappy-teeth.hatenablog.com%2Fentry%2F2018%2F11%2F07%2F084951" title="X(Twitter)で投稿する" ></a> </div> <span> <div class="line-it-button" style="display: none;" data-type="share-e" data-lang="ja" ></div> <script src="//scdn.line-apps.com/n/line_it/thirdparty/loader.min.js" async="async" defer="defer" ></script> </span> </div> <div class="google-afc-image test-google-rectangle-ads"> <div id="google_afc_user_container_1" class="google-afc-user-container google_afc_blocklink2_5 google_afc_boder" data-test-unit="/4374287/blog_user"></div> <a href="http://blog.hatena.ne.jp/guide/pro" class="open-pro-modal" data-guide-pro-modal-ad-url="https://hatena.blog/guide/pro/modal/ad">広告を非表示にする</a> </div> <div class="customized-footer"> <div class="entry-footer-modules" id="entry-footer-secondary-modules"> <div class="hatena-module hatena-module-related-entries" > <!-- Hatena-Epic-has-related-entries-with-elasticsearch:true --> <div class="hatena-module-title"> 関連記事 </div> <div class="hatena-module-body"> <ul class="related-entries hatena-urllist urllist-with-thumbnails"> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <a class="urllist-image-link related-entries-image-link" href="https://happy-teeth.hatenablog.com/entry/2021/05/07/134723"> <img alt="Swift UI MapKit 忘備録" src="https://cdn.image.st-hatena.com/image/square/a0e2253accff564c52a265a8f416cbe3e98fe4ba/backend=imagemagick;height=100;version=1;width=100/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fh%2Fhappy_teeth_ago%2F20210507%2F20210507133700.png" class="urllist-image related-entries-image" title="Swift UI MapKit 忘備録" width="100" height="100" loading="lazy"> </a> <div class="urllist-date-link related-entries-date-link"> <a href="https://happy-teeth.hatenablog.com/archive/2021/05/07" rel="nofollow"> <time datetime="2021-05-07T04:47:23Z" title="2021-05-07T04:47:23Z"> 2021-05-07 </time> </a> </div> <a href="https://happy-teeth.hatenablog.com/entry/2021/05/07/134723" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Swift UI MapKit 忘備録</a> <div class="urllist-entry-body related-entries-entry-body">point UIViewRepresentableを継承 デリケートメソッド?を2つ…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <a class="urllist-image-link related-entries-image-link" href="https://happy-teeth.hatenablog.com/entry/2019/05/30/083224"> <img alt="Swift Delegate カスタムセル 実装処理" src="https://cdn.image.st-hatena.com/image/square/148fd152dbf7958e541b21f5efbb245206e2c558/backend=imagemagick;height=100;version=1;width=100/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fh%2Fhappy_teeth_ago%2F20190530%2F20190530082902.png" class="urllist-image related-entries-image" title="Swift Delegate カスタムセル 実装処理" width="100" height="100" loading="lazy"> </a> <div class="urllist-date-link related-entries-date-link"> <a href="https://happy-teeth.hatenablog.com/archive/2019/05/30" rel="nofollow"> <time datetime="2019-05-29T23:32:24Z" title="2019-05-29T23:32:24Z"> 2019-05-30 </time> </a> </div> <a href="https://happy-teeth.hatenablog.com/entry/2019/05/30/083224" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Swift Delegate カスタムセル 実装処理</a> <div class="urllist-entry-body related-entries-entry-body">delegateについて記事を探したが、一般論でしかなく理解し難い…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <div class="urllist-date-link related-entries-date-link"> <a href="https://happy-teeth.hatenablog.com/archive/2019/04/19" rel="nofollow"> <time datetime="2019-04-19T07:14:09Z" title="2019-04-19T07:14:09Z"> 2019-04-19 </time> </a> </div> <a href="https://happy-teeth.hatenablog.com/entry/2019/04/19/161409" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">コードを日本語へ! Swift UITextField, UITextViewがキーボードで隠れるの…</a> <div class="urllist-entry-body related-entries-entry-body">参考にさせていただきました。 【Swift】UITextField, UITextVi…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <div class="urllist-date-link related-entries-date-link"> <a href="https://happy-teeth.hatenablog.com/archive/2018/12/21" rel="nofollow"> <time datetime="2018-12-21T09:40:19Z" title="2018-12-21T09:40:19Z"> 2018-12-21 </time> </a> </div> <a href="https://happy-teeth.hatenablog.com/entry/2018/12/21/184019" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Swift index</a> <div class="urllist-entry-body related-entries-entry-body">与えられたコレクション、配列などのインデックスを返すメソッ…</div> </div> </li> <li class="urllist-item related-entries-item"> <div class="urllist-item-inner related-entries-item-inner"> <div class="urllist-date-link related-entries-date-link"> <a href="https://happy-teeth.hatenablog.com/archive/2018/08/08" rel="nofollow"> <time datetime="2018-08-08T01:40:03Z" title="2018-08-08T01:40:03Z"> 2018-08-08 </time> </a> </div> <a href="https://happy-teeth.hatenablog.com/entry/2018/08/08/104003" class="urllist-title-link related-entries-title-link urllist-title related-entries-title">Swift3 CoreDataソート実装</a> <div class="urllist-entry-body related-entries-entry-body">ソートについてまとめる 以下の関数を日付でソートしたいとする…</div> </div> </li> </ul> </div> </div> </div> </div> <div class="comment-box js-comment-box"> <ul class="comment js-comment"> <li class="read-more-comments" style="display: none;"><a>もっと読む</a></li> </ul> <a class="leave-comment-title js-leave-comment-title">コメントを書く</a> </div> </footer> </div> </article> <!-- rakuten_ad_target_end --> <!-- google_ad_section_end --> <div class="pager pager-permalink permalink"> <span class="pager-prev"> <a href="https://happy-teeth.hatenablog.com/entry/2018/11/17/084601" rel="prev"> <span class="pager-arrow">« </span> swift git ignore Mac 特殊ファイルの除外… </a> </span> <span class="pager-next"> <a href="https://happy-teeth.hatenablog.com/entry/2018/11/01/215317" rel="next"> Swift TabBarでの値の受け渡し <span class="pager-arrow"> »</span> </a> </span> </div> </div> </div> <aside id="box1"> <div id="box1-inner"> </div> </aside> </div><!-- #wrapper --> <aside id="box2"> <div id="box2-inner"> <div class="hatena-module hatena-module-profile"> <div class="hatena-module-title"> プロフィール </div> <div class="hatena-module-body"> <a href="https://happy-teeth.hatenablog.com/about" class="profile-icon-link"> <img src="https://cdn.profile-image.st-hatena.com/users/happy_teeth_ago/profile.png" alt="id:happy_teeth_ago" class="profile-icon" /> </a> <span class="id"> <a href="https://happy-teeth.hatenablog.com/about" class="hatena-id-link"><span data-load-nickname="1" data-user-name="happy_teeth_ago">id:happy_teeth_ago</span></a> </span> <div class="hatena-follow-button-box btn-subscribe js-hatena-follow-button-box" > <a href="#" class="hatena-follow-button js-hatena-follow-button"> <span class="subscribing"> <span class="foreground">読者です</span> <span class="background">読者をやめる</span> </span> <span class="unsubscribing" data-track-name="profile-widget-subscribe-button" data-track-once> <span class="foreground">読者になる</span> <span class="background">読者になる</span> </span> </a> <div class="subscription-count-box js-subscription-count-box"> <i></i> <u></u> <span class="subscription-count js-subscription-count"> </span> </div> </div> <div class="profile-about"> <a href="https://happy-teeth.hatenablog.com/about">このブログについて</a> </div> </div> </div> <div class="hatena-module hatena-module-search-box"> <div class="hatena-module-title"> 検索 </div> <div class="hatena-module-body"> <form class="search-form" role="search" action="https://happy-teeth.hatenablog.com/search" method="get"> <input type="text" name="q" class="search-module-input" value="" placeholder="記事を検索" required> <input type="submit" value="検索" class="search-module-button" /> </form> </div> </div> <div class="hatena-module hatena-module-links"> <div class="hatena-module-title"> リンク </div> <div class="hatena-module-body"> <ul class="hatena-urllist"> <li> <a href="https://hatena.blog/">はてなブログ</a> </li> <li> <a href="https://hatena.blog/guide?via=200109">ブログをはじめる</a> </li> <li> <a href="http://blog.hatenablog.com">週刊はてなブログ</a> </li> <li> <a href="https://hatena.blog/guide/pro">はてなブログPro</a> </li> </ul> </div> </div> <div class="hatena-module hatena-module-recent-entries "> <div class="hatena-module-title"> <a href="https://happy-teeth.hatenablog.com/archive"> 最新記事 </a> </div> <div class="hatena-module-body"> <ul class="recent-entries hatena-urllist "> <li class="urllist-item recent-entries-item"> <div class="urllist-item-inner recent-entries-item-inner"> <a href="https://happy-teeth.hatenablog.com/entry/2023/05/05/141921" class="urllist-title-link recent-entries-title-link urllist-title recent-entries-title">Xcode 14.3でシュミレータのビルドエラー</a> </div> </li> <li class="urllist-item recent-entries-item"> <div class="urllist-item-inner recent-entries-item-inner"> <a href="https://happy-teeth.hatenablog.com/entry/2023/05/03/090950" class="urllist-title-link recent-entries-title-link urllist-title recent-entries-title">【XCode】Unable to boot the Simulator. Failed to start launchd_sim: の原因</a> </div> </li> <li class="urllist-item recent-entries-item"> <div class="urllist-item-inner recent-entries-item-inner"> <a href="https://happy-teeth.hatenablog.com/entry/2023/05/02/083929" class="urllist-title-link recent-entries-title-link urllist-title recent-entries-title">wordpress おすすめプラグイン</a> </div> </li> <li class="urllist-item recent-entries-item"> <div class="urllist-item-inner recent-entries-item-inner"> <a href="https://happy-teeth.hatenablog.com/entry/2023/04/28/065129" class="urllist-title-link recent-entries-title-link urllist-title recent-entries-title">ChatGPTの使い方</a> </div> </li> <li class="urllist-item recent-entries-item"> <div class="urllist-item-inner recent-entries-item-inner"> <a href="https://happy-teeth.hatenablog.com/entry/2023/04/27/170816" class="urllist-title-link recent-entries-title-link urllist-title recent-entries-title">M1 MAC環境構築 忘備録</a> </div> </li> </ul> </div> </div> <div class="hatena-module hatena-module-archive" data-archive-type="default" data-archive-url="https://happy-teeth.hatenablog.com/archive"> <div class="hatena-module-title"> <a href="https://happy-teeth.hatenablog.com/archive">月別アーカイブ</a> </div> <div class="hatena-module-body"> <ul class="hatena-urllist"> <li class="archive-module-year archive-module-year-hidden" data-year="2023"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://happy-teeth.hatenablog.com/archive/2023" class="archive-module-year-title archive-module-year-2023"> 2023 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2023/05" class="archive-module-month-title archive-module-month-2023-5"> 2023 / 5 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2023/04" class="archive-module-month-title archive-module-month-2023-4"> 2023 / 4 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2022"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://happy-teeth.hatenablog.com/archive/2022" class="archive-module-year-title archive-module-year-2022"> 2022 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2022/12" class="archive-module-month-title archive-module-month-2022-12"> 2022 / 12 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2022/10" class="archive-module-month-title archive-module-month-2022-10"> 2022 / 10 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2022/08" class="archive-module-month-title archive-module-month-2022-8"> 2022 / 8 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2022/05" class="archive-module-month-title archive-module-month-2022-5"> 2022 / 5 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2021"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://happy-teeth.hatenablog.com/archive/2021" class="archive-module-year-title archive-module-year-2021"> 2021 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/12" class="archive-module-month-title archive-module-month-2021-12"> 2021 / 12 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/11" class="archive-module-month-title archive-module-month-2021-11"> 2021 / 11 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/08" class="archive-module-month-title archive-module-month-2021-8"> 2021 / 8 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/07" class="archive-module-month-title archive-module-month-2021-7"> 2021 / 7 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/06" class="archive-module-month-title archive-module-month-2021-6"> 2021 / 6 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/05" class="archive-module-month-title archive-module-month-2021-5"> 2021 / 5 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/04" class="archive-module-month-title archive-module-month-2021-4"> 2021 / 4 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/03" class="archive-module-month-title archive-module-month-2021-3"> 2021 / 3 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/02" class="archive-module-month-title archive-module-month-2021-2"> 2021 / 2 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2021/01" class="archive-module-month-title archive-module-month-2021-1"> 2021 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2020"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://happy-teeth.hatenablog.com/archive/2020" class="archive-module-year-title archive-module-year-2020"> 2020 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/12" class="archive-module-month-title archive-module-month-2020-12"> 2020 / 12 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/11" class="archive-module-month-title archive-module-month-2020-11"> 2020 / 11 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/10" class="archive-module-month-title archive-module-month-2020-10"> 2020 / 10 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/08" class="archive-module-month-title archive-module-month-2020-8"> 2020 / 8 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/07" class="archive-module-month-title archive-module-month-2020-7"> 2020 / 7 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/04" class="archive-module-month-title archive-module-month-2020-4"> 2020 / 4 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/03" class="archive-module-month-title archive-module-month-2020-3"> 2020 / 3 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/02" class="archive-module-month-title archive-module-month-2020-2"> 2020 / 2 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2020/01" class="archive-module-month-title archive-module-month-2020-1"> 2020 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2019"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://happy-teeth.hatenablog.com/archive/2019" class="archive-module-year-title archive-module-year-2019"> 2019 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/12" class="archive-module-month-title archive-module-month-2019-12"> 2019 / 12 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/11" class="archive-module-month-title archive-module-month-2019-11"> 2019 / 11 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/10" class="archive-module-month-title archive-module-month-2019-10"> 2019 / 10 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/09" class="archive-module-month-title archive-module-month-2019-9"> 2019 / 9 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/08" class="archive-module-month-title archive-module-month-2019-8"> 2019 / 8 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/07" class="archive-module-month-title archive-module-month-2019-7"> 2019 / 7 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/06" class="archive-module-month-title archive-module-month-2019-6"> 2019 / 6 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/05" class="archive-module-month-title archive-module-month-2019-5"> 2019 / 5 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/04" class="archive-module-month-title archive-module-month-2019-4"> 2019 / 4 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/03" class="archive-module-month-title archive-module-month-2019-3"> 2019 / 3 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/02" class="archive-module-month-title archive-module-month-2019-2"> 2019 / 2 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2019/01" class="archive-module-month-title archive-module-month-2019-1"> 2019 / 1 </a> </li> </ul> </li> <li class="archive-module-year archive-module-year-hidden" data-year="2018"> <div class="archive-module-button"> <span class="archive-module-hide-button">▼</span> <span class="archive-module-show-button">▶</span> </div> <a href="https://happy-teeth.hatenablog.com/archive/2018" class="archive-module-year-title archive-module-year-2018"> 2018 </a> <ul class="archive-module-months"> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2018/12" class="archive-module-month-title archive-module-month-2018-12"> 2018 / 12 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2018/11" class="archive-module-month-title archive-module-month-2018-11"> 2018 / 11 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2018/10" class="archive-module-month-title archive-module-month-2018-10"> 2018 / 10 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2018/09" class="archive-module-month-title archive-module-month-2018-9"> 2018 / 9 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2018/08" class="archive-module-month-title archive-module-month-2018-8"> 2018 / 8 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2018/07" class="archive-module-month-title archive-module-month-2018-7"> 2018 / 7 </a> </li> <li class="archive-module-month"> <a href="https://happy-teeth.hatenablog.com/archive/2018/06" class="archive-module-month-title archive-module-month-2018-6"> 2018 / 6 </a> </li> </ul> </li> </ul> </div> </div> </div> </aside> </div> </div> </div> </div> <footer id="footer" data-brand="hatenablog"> <div id="footer-inner"> <div style="display:none !important" class="guest-footer js-guide-register test-blogs-register-guide" data-action="guide-register"> <div class="guest-footer-content"> <h3>はてなブログをはじめよう!</h3> <p>happy_teeth_agoさんは、はてなブログを使っています。あなたもはてなブログをはじめてみませんか?</p> <div class="guest-footer-btn-container"> <div class="guest-footer-btn"> <a class="btn btn-register js-inherit-ga" href="https://blog.hatena.ne.jp/register?via=200227" target="_blank">はてなブログをはじめる(無料)</a> </div> <div class="guest-footer-btn"> <a href="https://hatena.blog/guide" target="_blank">はてなブログとは</a> </div> </div> </div> </div> <address class="footer-address"> <a href="https://happy-teeth.hatenablog.com/"> <img src="https://cdn.blog.st-hatena.com/images/admin/blog-icon-noimage.png" width="16" height="16" alt="happy_teeth's 忘備録"/> <span class="footer-address-name">happy_teeth's 忘備録</span> </a> </address> <p class="services"> Powered by <a href="https://hatena.blog/">Hatena Blog</a> | <a href="https://blog.hatena.ne.jp/-/abuse_report?target_url=https%3A%2F%2Fhappy-teeth.hatenablog.com%2Fentry%2F2018%2F11%2F07%2F084951" class="report-abuse-link test-report-abuse-link" target="_blank">ブログを報告する</a> </p> </div> </footer> <script async src="https://s.hatena.ne.jp/js/widget/star.js"></script> <script> if (typeof window.Hatena === 'undefined') { window.Hatena = {}; } if (!Hatena.hasOwnProperty('Star')) { Hatena.Star = { VERSION: 2, }; } </script> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&appId=719729204785177&version=v17.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="quote-box"> <div class="tooltip-quote tooltip-quote-stock"> <i class="blogicon-quote" title="引用をストック"></i> </div> <div class="tooltip-quote tooltip-quote-tweet js-tooltip-quote-tweet"> <a class="js-tweet-quote" target="_blank" data-track-name="quote-tweet" data-track-once> <img src="https://cdn.blog.st-hatena.com/images/admin/quote/quote-x-icon.svg?version=05fe606a7bc1ebffe3913b346b8d50" title="引用して投稿する" > </a> </div> </div> <div class="quote-stock-panel" id="quote-stock-message-box" style="position: absolute; z-index: 3000"> <div class="message-box" id="quote-stock-succeeded-message" style="display: none"> <p>引用をストックしました</p> <button class="btn btn-primary" id="quote-stock-show-editor-button" data-track-name="curation-quote-edit-button">ストック一覧を見る</button> <button class="btn quote-stock-close-message-button">閉じる</button> </div> <div class="message-box" id="quote-login-required-message" style="display: none"> <p>引用するにはまずログインしてください</p> <button class="btn btn-primary" id="quote-login-button">ログイン</button> <button class="btn quote-stock-close-message-button">閉じる</button> </div> <div class="error-box" id="quote-stock-failed-message" style="display: none"> <p>引用をストックできませんでした。再度お試しください</p> <button class="btn quote-stock-close-message-button">閉じる</button> </div> <div class="error-box" id="unstockable-quote-message-box" style="display: none; position: absolute; z-index: 3000;"> <p>限定公開記事のため引用できません。</p> </div> </div> <script type="x-underscore-template" id="js-requote-button-template"> <div class="requote-button js-requote-button"> <button class="requote-button-btn tipsy-top" title="引用する"><i class="blogicon-quote"></i></button> </div> </script> <div id="hidden-subscribe-button" style="display: none;"> <div class="hatena-follow-button-box btn-subscribe js-hatena-follow-button-box" > <a href="#" class="hatena-follow-button js-hatena-follow-button"> <span class="subscribing"> <span class="foreground">読者です</span> <span class="background">読者をやめる</span> </span> <span class="unsubscribing" data-track-name="profile-widget-subscribe-button" data-track-once> <span class="foreground">読者になる</span> <span class="background">読者になる</span> </span> </a> <div class="subscription-count-box js-subscription-count-box"> <i></i> <u></u> <span class="subscription-count js-subscription-count"> </span> </div> </div> </div> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> <script src="https://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script> <script type="text/javascript" src="https://cdn.blog.st-hatena.com/js/external/jquery.min.js?v=1.12.4&version=05fe606a7bc1ebffe3913b346b8d50"></script> <script src="https://cdn.blog.st-hatena.com/js/texts-ja.js?version=05fe606a7bc1ebffe3913b346b8d50"></script> <script id="vendors-js" data-env="production" src="https://cdn.blog.st-hatena.com/js/vendors.js?version=05fe606a7bc1ebffe3913b346b8d50" crossorigin="anonymous"></script> <script id="hatenablog-js" data-env="production" src="https://cdn.blog.st-hatena.com/js/hatenablog.js?version=05fe606a7bc1ebffe3913b346b8d50" crossorigin="anonymous" data-page-id="entry"></script> <script>Hatena.Diary.GlobalHeader.init()</script> <script id="valve-dmp" data-service="blog" src="https://cdn.pool.st-hatena.com/valve/dmp.js" data-test-id="dmpjs" async></script> </body> </html>