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

PHP
WINDOWS下安装MySQL
PHP 制作 网站/服务器 监视脚本
用PHP和CSS制作活动按钮
PHP 单件模式
PHP MVC模式,类封装以及HACK
PHP 中使用正则表达式
PHP 防止 SQL 注入攻击
PHP 跨站点脚本攻击
PHP 防止用户操纵 GET 变量
PHP 防止远程表单提交

PHP 中的 xml_parser_create_ns() 函数


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

Definition and Usage
定义和用法

The xml_parser_create_ns() function creates an XML parser with namespace support.
xml_parser_create_ns()函数的作用是:创建一个支持名称空间的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_ns(encoding,separator)

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

separator Optional. Specifies the output separator for tag name and namespace. Default is " : "
可选参数。为制表符[tag]名称和名称空间指定输出的分割号[out separator],默认值为:" : "


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 without namespace support, use the xml_parser_create() function instead.
提示:你可以使用xml_parser_create_ns()函数来建立一个支持名称空间[namespace]的XML解析器。


Example
案例

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

评论 (0) All

登陆 | 还没注册?