mirror of
https://github.com/php/doc-zh.git
synced 2026-03-24 07:02:15 +01:00
113 lines
3.3 KiB
XML
113 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- $Revision$ -->
|
||
<!-- EN-Revision: b47e4bea197126359815c5e43403c4b77a0aaaa7 Maintainer: class007 Status: ready -->
|
||
<!-- CREDITS: mowangjuanzi, Luffy -->
|
||
<refentry xml:id="function.xml-parser-create-ns" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>xml_parser_create_ns</refname>
|
||
<refpurpose>创建支持命名空间的 XML 解析器</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type>XMLParser</type><methodname>xml_parser_create_ns</methodname>
|
||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
|
||
<methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>":"</initializer></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
<function>xml_parser_create_ns</function> 新建支持 XML 命名空间的解析器并返回可被其它 XML 函数使用的 <classname>XMLParser</classname> 实例。
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>encoding</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
自动检测输入编码,因此 <parameter>encoding</parameter> 参数仅指定输出编码。默认输出字符集是 UTF-8。支持的编码有
|
||
<literal>ISO-8859-1</literal>、<literal>UTF-8</literal> 和 <literal>US-ASCII</literal>。
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><parameter>separator</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
使用名称空间感知的解析器标记参数传递给各种处理函数将由名称空间和标记名称组成,这些名称由 <parameter>separator</parameter> 中指定的字符串分隔。
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
返回新 <classname>XMLParser</classname> 实例。
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="changelog">
|
||
&reftitle.changelog;
|
||
<informaltable>
|
||
<tgroup cols="2">
|
||
<thead>
|
||
<row>
|
||
<entry>&Version;</entry>
|
||
<entry>&Description;</entry>
|
||
</row>
|
||
</thead>
|
||
<tbody>
|
||
<row>
|
||
<entry>8.0.0</entry>
|
||
<entry>
|
||
此函数现在返回 <classname>XMLParser</classname> 实例;之前返回 <type>resource</type>,&return.falseforfailure;。
|
||
</entry>
|
||
</row>
|
||
<row>
|
||
<entry>8.0.0</entry>
|
||
<entry>
|
||
<parameter>encoding</parameter> 现在可以为 null。
|
||
</entry>
|
||
</row>
|
||
</tbody>
|
||
</tgroup>
|
||
</informaltable>
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<para>
|
||
<simplelist>
|
||
<member><function>xml_parser_create</function></member>
|
||
</simplelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
</refentry>
|
||
<!-- Keep this comment at the end of the file
|
||
Local variables:
|
||
mode: sgml
|
||
sgml-omittag:t
|
||
sgml-shorttag:t
|
||
sgml-minimize-attributes:nil
|
||
sgml-always-quote-attributes:t
|
||
sgml-indent-step:1
|
||
sgml-indent-data:t
|
||
indent-tabs-mode:nil
|
||
sgml-parent-document:nil
|
||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||
sgml-exposed-tags:nil
|
||
sgml-local-catalogs:nil
|
||
sgml-local-ecat-files:nil
|
||
End:
|
||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||
vim: et tw=78 syn=sgml
|
||
vi: ts=1 sw=1
|
||
-->
|