<?xml version="1.0" encoding="UTF-8"?>
<catalog shelf="海边书架">
<record title="潮汐图">
<type>科学</type>
<format>PDF</format>
<year>2025</year>
<rating>A</rating>
<stars>5</stars>
<description>潮汐 & 风 <![CDATA[<坐标>]]> <em>潮头</em> 回落</description>
</record>
<record title="巡灯记">
<type>纪实</type>
<format>EPUB</format>
<episodes>3</episodes>
<rating>B</rating>
<description>三次夜航。</description>
</record>
<record title="雨量簿">
<type>记录</type>
<format>CSV</format>
<year>2024</year>
<rating></rating>
<stars>4</stars>
<description>站点甲与乙。</description>
</record>
<record title="云层线索">
<type>观测</type>
<format>TXT</format>
<description>没有评分字段。</description>
</record>
</catalog>
本例需在 本地 Python 3 与 UTF-8 XML 中运行,请复制源码、保存文件或下载工程包后在本地执行验证。
运行说明与环境独立工程
运行环境:本地 Python 3 与 UTF-8 XML
入口文件:projects/python-lab/xml-catalog-lab.xml
本地运行步骤快速上手
- 点击上方“保存源码”保存为
xml-catalog-lab.xml,或下载右侧课程工程包。 - 确认本地已准备 本地 Python 3 与 UTF-8 XML。
- 按对应章节命令执行,结合正文核对实际输出。
附件与关联工程包下载
课程关联工程包(登记关联82章) · 含当前章节或实例 · mbskycom202611a463.zip
课程关联工程包(登记关联82章) · 含当前章节或实例 · mbskycom202612a292.zip