📄 function.xml-parser-create.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Create an XML parser</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.xml-parser-create-ns.html">xml_parser_create_ns</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xml-parser-free.html">xml_parser_free</a></div> <div class="up"><a href="ref.xml.html">XML Parser Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.xml-parser-create" class="refentry"> <div class="refnamediv"> <h1 class="refname">xml_parser_create</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">xml_parser_create</span> — <span class="dc-title">Create an XML parser</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">resource</span> <span class="methodname"><b><b>xml_parser_create</b></b></span> ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$encoding</tt></span> ] )</div> <p class="para rdfs-comment"> <b>xml_parser_create()</b> creates a new XML parser and returns a resource handle referencing it to be used by the other XML functions. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">encoding</tt></i></span> <dd> <p class="para"> The optional <i><tt class="parameter">encoding</tt></i> specifies the character encoding for the input/output in PHP 4. Starting from PHP 5, the input encoding is automatically detected, so that the <i><tt class="parameter">encoding</tt></i> parameter specifies only the output encoding. In PHP 4, the default output encoding is the same as the input charset. If empty string is passed, the parser attempts to identify which encoding the document is encoded in by looking at the heading 3 or 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported encodings are <i>ISO-8859-1</i>, <i>UTF-8</i> and <i>US-ASCII</i>. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns a resource handle for the new XML parser. </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.xml-parser-create-ns.html" class="function" rel="rdfs-seeAlso">xml_parser_create_ns()</a></li> <li class="member"><a href="function.xml-parser-free.html" class="function" rel="rdfs-seeAlso">xml_parser_free()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.xml-parser-create-ns.html">xml_parser_create_ns</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xml-parser-free.html">xml_parser_free</a></div> <div class="up"><a href="ref.xml.html">XML Parser Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -