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

PHP
php 无限分类的实现
常用PHP代码
windows下安装配置php视频教程
MySQL数据库结构和数据的导出和导入
PHP实现 IP Whois 查询
PHP5 this,self和parent关键字详解
PHP 安全技巧连载 #1[译]
PHP 安全技巧连载 #2[译]
PHP 安全技巧连载 #3[译]
PHP 安全技巧连载 #4[译]
PHP 安全技巧连载 #5[译]
PHP 安全技巧连载 #6[译]
PHP 安全技巧连载 #7[译]
PHP 安全技巧连载 #8[译]
PHP 安全技巧连载 #9[译]
PHP 安全技巧连载 #10[译]
PHP 安全技巧连载 #11[译]
PHP error_reporting的使用
PHP 安全技巧连载 #12
使用PHP做Linux/Unix守护进程

PHP 中的 xml_parser_create() 函数


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 497 ::
收藏到网摘: 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

登陆 | 还没注册?