@@ -95,6 +95,10 @@ msgid ""
95
95
"(Latin1), and ASCII. If *encoding* [1]_ is given it will override the "
96
96
"implicit or explicit encoding of the document."
97
97
msgstr ""
98
+ "创建并返回一个新的 :class:`xmlparser` 对象。 如果指定了 *encoding*,它必须为指定 XML "
99
+ "数据所使用的编码格式名称的字符串。 Expat 支持的编码格式没有 Python 那样多,而且它的编码格式库也不能被扩展;它支持 UTF-8, "
100
+ "UTF-16, ISO-8859-1 (Latin1) 和 ASCII。 如果给出了 *encoding* [1]_ "
101
+ "则它将覆盖隐式或显式指定的文档编码格式。"
98
102
99
103
#: ../../library/pyexpat.rst:76
100
104
msgid ""
@@ -110,18 +114,24 @@ msgid ""
110
114
"zero byte (``chr(0)``) then the namespace URI and the local part will be "
111
115
"concatenated without any separator."
112
116
msgstr ""
117
+ "可以选择让 Expat 为你做 XML 命名空间处理,这是通过提供 *namespace_separator* 值来启用的。 "
118
+ "该值必须是一个单字符的字符串;如果字符串的长度不合法则将引发 :exc:`ValueError` (``None`` 被视为等同于省略)。 "
119
+ "当命名空间处理被启用时,属于特定命名空间的元素类型名称和属性名称将被展开。 传递给The element name passed to the "
120
+ "元素处理句柄 :attr:`StartElementHandler` 和 :attr:`EndElementHandler` 的元素名称将为命名空间 "
121
+ "URI,命名空间分隔符和名称的本地部分的拼接。 如果命名空间分隔符是一个零字节 (``chr(0)``) 则命名空间 URI "
122
+ "和本地部分将被直接拼接而不带任何分隔符。"
113
123
114
124
#: ../../library/pyexpat.rst:88
115
125
msgid ""
116
126
"For example, if *namespace_separator* is set to a space character (``' '``) "
117
127
"and the following document is parsed:"
118
- msgstr ""
128
+ msgstr "举例来说,如果 *namespace_separator* 被设为空格符 (``' '``) 并对以下文档进行解析: "
119
129
120
130
#: ../../library/pyexpat.rst:100
121
131
msgid ""
122
132
":attr:`StartElementHandler` will receive the following strings for each "
123
133
"element::"
124
- msgstr ""
134
+ msgstr ":attr:`StartElementHandler` 将为每个元素获取以下字符串:: "
125
135
126
136
#: ../../library/pyexpat.rst:107
127
137
msgid ""
@@ -130,6 +140,8 @@ msgid ""
130
140
"document. Call ``ParserCreate`` for each document to provide unique parser "
131
141
"instances."
132
142
msgstr ""
143
+ "由于 :mod:`pyexpat` 所使用的 ``Expat`` 库的限制,被返回的 :class:`xmlparser` 实例只能被用来解析单个 "
144
+ "XML 文档。 请为每个文档调用 ``ParserCreate`` 来提供单独的解析器实例。"
133
145
134
146
#: ../../library/pyexpat.rst:115
135
147
msgid "`The Expat XML Parser <http://www.libexpat.org/>`_"
0 commit comments