<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sato_san</author_name>
  <author_url>https://blog.hatena.ne.jp/sato_san/</author_url>
  <blog_title>さとうさんのキロク</blog_title>
  <blog_url>https://sato-san.hatenadiary.jp/</blog_url>
  <categories>
    <anon>技術の何か</anon>
  </categories>
  <description>あるページをPHPで解析して、余分な箇所を除去したい。そんなことがありました。 そこでなーんかいい方法はないものかと調べたところ「PHP Simple HTML DOM Parser」なる物があることがわかりました。 実際は結構前からわかっていたけど記事起こしが今回初。 PHPでHTML解析するのは結構めんどくさい 方法の一つとしてUTF-8へエンコーディング変換した後のHTMLをDOMDocumentクラスを利用して整形後、 出力結果をsimplexml_load_string関数でHTMLをオブジェクトとして取得し、結果を元に値の取得はできます。 こちらのページで詳しく記載されています。（…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsato-san.hatenadiary.jp%2Fentry%2F2013%2F05%2F06%2F155919&quot; title=&quot;PHPでHTMLをパースして解析、編集して保存する方法 - さとうさんのキロク&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-05-06 15:59:19</published>
  <title>PHPでHTMLをパースして解析、編集して保存する方法</title>
  <type>rich</type>
  <url>https://sato-san.hatenadiary.jp/entry/2013/05/06/155919</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
