@@ -133,6 +133,9 @@ msgid ""
133133":attr:`documentElement` property. It gives you the main element in the XML "
134134"document: the one that holds all others. Here is an example program::"
135135msgstr ""
136+ "一旦你得到了 DOM 文档对象,你就可以通过其属性和方法访问对应 XML 文档的各个部分。 这些属性定义在 DOM "
137+ "规格说明当中;文档对象的主要特征属性是 :attr:`documentElement`。 它给出了 XML 文档中的主元素:即包含了所有其他元素的元素。"
138+ " 以下是一个示例程序::"
136139
137140#: ../../library/xml.dom.minidom.rst:95
138141msgid ""
@@ -143,6 +146,9 @@ msgid ""
143146"useless. Otherwise, Python's garbage collector will eventually take care of"
144147" the objects in the tree."
145148msgstr ""
149+ "当你完成对一个 DOM 树的处理时,你可以选择调用 :meth:`unlink` 方法以鼓励尽早清除不再需要的对象。 :meth:`unlink` 是 "
150+ ":mod:`xml.dom.minidom` 针对 DOM API 的专属扩展,它会将特定节点及其下级标记为不再有用。 在其他情况下,Python "
151+ "的垃圾回收器将负责最终处理树结构中的对象。"
146152
147153#: ../../library/xml.dom.minidom.rst:104
148154msgid ""
@@ -157,14 +163,16 @@ msgstr "被 :mod:`xml.dom.minidom` 所支持的 W3C 针对 DOM 的建议。"
157163
158164#: ../../library/xml.dom.minidom.rst:111
159165msgid "DOM Objects"
160- msgstr ""
166+ msgstr "DOM 对象 "
161167
162168#: ../../library/xml.dom.minidom.rst:113
163169msgid ""
164170"The definition of the DOM API for Python is given as part of the "
165171":mod:`xml.dom` module documentation. This section lists the differences "
166172"between the API and :mod:`xml.dom.minidom`."
167173msgstr ""
174+ "Python 的 DOM API 定义被作为 :mod:`xml.dom` 模块文档的一部分给出。 这一节列出了该 API 和 "
175+ ":mod:`xml.dom.minidom` 之间的差异。"
168176
169177#: ../../library/xml.dom.minidom.rst:120
170178msgid ""
@@ -175,6 +183,9 @@ msgid ""
175183"practice. This only needs to be called on the :class:`Document` object, but"
176184" may be called on child nodes to discard children of that node."
177185msgstr ""
186+ "破坏 DOM 的内部引用以便它能在没有循环 GC 的 Python 版本上垃圾回收器回收。 即使在循环 GC "
187+ "可用的时候,使用此方法也可让大量内存更快变为可用,因此当 DOM 对象不再被需要时尽早调用它们的这个方法是很好的做法。 此方法只须在 "
188+ ":class:`Document` 对象上调用,但也可以在下级节点上调用以丢弃该节点的下级节点。"
178189
179190#: ../../library/xml.dom.minidom.rst:127
180191msgid ""
0 commit comments