@@ -17,9 +17,8 @@ msgstr ""
1717"Generated-By : Babel 2.17.0\n "
1818
1919#: ../../library/xml.dom.pulldom.rst:2
20- #, fuzzy
2120msgid ":mod:`!xml.dom.pulldom` --- Support for building partial DOM trees"
22- msgstr ":mod:`xml.dom.pulldom` --- 부분 DOM 트리 구축 지원"
21+ msgstr ":mod:`! xml.dom.pulldom` --- 부분 DOM 트리 구축 지원"
2322
2423#: ../../library/xml.dom.pulldom.rst:9
2524msgid "**Source code:** :source:`Lib/xml/dom/pulldom.py`"
@@ -70,6 +69,13 @@ msgid ""
7069"parser.setFeature(feature_external_ges, True)\n"
7170"parse(filename, parser=parser)"
7271msgstr ""
72+ "from xml.dom.pulldom import parse\n"
73+ "from xml.sax import make_parser\n"
74+ "from xml.sax.handler import feature_external_ges\n"
75+ "\n"
76+ "parser = make_parser()\n"
77+ "parser.setFeature(feature_external_ges, True)\n"
78+ "parse(filename, parser=parser)"
7379
7480#: ../../library/xml.dom.pulldom.rst:43
7581msgid "Example::"
@@ -86,6 +92,14 @@ msgid ""
8692" doc.expandNode(node)\n"
8793" print(node.toxml())"
8894msgstr ""
95+ "from xml.dom import pulldom\n"
96+ "\n"
97+ "doc = pulldom.parse('sales_items.xml')\n"
98+ "for event, node in doc:\n"
99+ " if event == pulldom.START_ELEMENT and node.tagName == 'item':\n"
100+ " if int(node.getAttribute('price')) > 50:\n"
101+ " doc.expandNode(node)\n"
102+ " print(node.toxml())"
89103
90104#: ../../library/xml.dom.pulldom.rst:54
91105msgid "``event`` is a constant and can be one of:"
@@ -192,9 +206,8 @@ msgid "DOMEventStream Objects"
192206msgstr "DOMEventStream 객체"
193207
194208#: ../../library/xml.dom.pulldom.rst:117
195- #, fuzzy
196209msgid "Support for :meth:`~object.__getitem__` method has been removed."
197- msgstr ":meth:`시퀀스 프로토콜 < __getitem__>` 지원은 폐지되었습니다 ."
210+ msgstr ":meth:`~object. __getitem__` 메서드 지원은 제거했습니다 ."
198211
199212#: ../../library/xml.dom.pulldom.rst:122
200213msgid ""
@@ -232,4 +245,16 @@ msgid ""
232245"text <div>and more</div></p>'\n"
233246" print(node.toxml())"
234247msgstr ""
248+ "from xml.dom import pulldom\n"
249+ "\n"
250+ "xml = '<html><title>Foo</title> <p>Some text <div>and more</div></p> "
251+ "</html>'\n"
252+ "doc = pulldom.parseString(xml)\n"
253+ "for event, node in doc:\n"
254+ " if event == pulldom.START_ELEMENT and node.tagName == 'p':\n"
255+ " # 다음 문장은 '<p/>' 만 인쇄합니다\n"
256+ " print(node.toxml())\n"
257+ " doc.expandNode(node)\n"
258+ " # 다음 문장은 노드와 모든 자식을 인쇄합니다 '<p>Some text <div>and more</div></p>'\n"
259+ " print(node.toxml())"
235260
0 commit comments