当前位置: 首页 > 网络学院 > 服务端脚本教程 > PHP > xml_parser_create() 函数

PHP
PHP 安全邮件
MySQL 介绍
连接 MySQL
创建 MySQL
MySQL 插入记录
MySQL 选择记录
MySQL Where
MySQL Order By
MySQL 记录更新
MySQL 删除记录
PHP ODBC
XML Expat Parser
XML SimpleXML
PHP 数组参考
PHP Calendar
PHP Date
PHP Directory
PHP Filesystem
PHP FTP
PHP HTTP

PHP 中的 xml_parser_create() 函数


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 498 ::
收藏到网摘: n/a

Definition and Usage
定义和用法

The xml_parser_create() function creates an XML parser.
xml_parser_create()函数的作用是:创建一个XML解析器。

This function returns a resource handle to be used by other XML functions on success, or FALSE on failure.
这个函数如果执行成功,将返回另一个XML函数的处理结果;如果执行失败,将返回False。

Syntax
语法

xml_parser_create(encoding)

Parameter参数 Description描述
encoding Optional. Specifies the output encoding. Default in PHP 5.0.2 and newer is UTF-8
可选参数。指定结果编码。在PHP5.0.2或其以上版本中将使用UTF-8

Possible values:
可能值:

  • ISO-8859-1
  • UTF-8
  • US-ASCII.

Note: In PHP 5, the input encoding is automatically detected. In PHP 4 and older versions, this paramterer specifies the character encoding for the input and output
注意:在PHP5中,它将会对输入的信息进行自动的编码。在PHP4和其更早版本中,这个参数是用来为输入和输出的信息指定字符编码的

Note: In PHP 5.0.0 and 5.0.1, default output charset is ISO-8859-1
注意:在PHP5.0.0和5.0.1中,默认的输出charset[字符串设置]是ISO-8859-1



Tips and Notes
提示

Tip: To free the xml parser, use the xml_parser_free() function.
提示:你可以使用xml_parser_free()函数来释放xml解析器。

Tip: To create an XML parser with namespace support, use the xml_parser_create_ns() function instead.
提示:你可以使用xml_parser_create_ns()函数来建立一个支持名称空间[namespace]的XML解析器。


Example
案例

<?php
$xmlparser = xml_parser_create();
xml_parser_free($xmlparser);
?>

评论 (0) All

登陆 | 还没注册?