<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tedd707</author_name>
  <author_url>https://blog.hatena.ne.jp/tedd707/</author_url>
  <blog_title>ITエンジニアが仕事に対して思うこと</blog_title>
  <blog_url>https://pythonjp.ikitai.net/</blog_url>
  <categories>
  </categories>
  <description>XMLはデータを階層的に表現するための一般的なフォーマットであり、Pythonのxml.etree.ElementTreeモジュールを使用することで、簡単にXMLデータを扱うことができます。この記事では、XMLデータの構造を変更せずに、特定の要素の属性やテキストを編集する方法に焦点を当てます。 XMLデータのサンプル まず初めに、以下のような簡単なXMLデータを考えてみましょう。 &lt;root&gt; &lt;person id=&quot;1&quot;&gt; &lt;name&gt;John Doe&lt;/name&gt; &lt;age&gt;30&lt;/age&gt; &lt;city&gt;Tokyo&lt;/city&gt; &lt;/person&gt; &lt;person id=&quot;2&quot;&gt; &lt;nam…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpythonjp.ikitai.net%2Fentry%2F2024%2F01%2F27%2F120510&quot; title=&quot;PythonでXMLデータを編集する: 構造を変えずに属性やテキストを更新する方法 - ITエンジニアが仕事に対して思うこと&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>2024-01-27 12:05:10</published>
  <title>PythonでXMLデータを編集する: 構造を変えずに属性やテキストを更新する方法</title>
  <type>rich</type>
  <url>https://pythonjp.ikitai.net/entry/2024/01/27/120510</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
