当前位置: 首页 > 网络学院 > 服务端脚本教程 > PHP > PHP SimpleXML

PHP
PHP Libxml
PHP Math
PHP Misc
PHP MySQL
PHP SimpleXML
PHP String
PHP XML
PHP Zip
PHP Mail
用PHP5的DirectoryIterators递归扫描目录
PHP 阻止SQL注入式攻击
PHP5面向对象 - 基础 - 类和对象
PHP5面向对象 - 基础 - 类的属性( public )
PHP5面向对象 - 基础 - 类的属性( private )
PHP5面向对象 - 基础 - 方法
PHP5面向对象 - 基础 - 对象的比较
php5面向对象 - 基础 - 构造函数
php5面向对象 - 基础 - 析构函数
用PHP控制用户的浏览器 - ob*函数的使用
PHP PDO 学习笔记

PHP SimpleXML


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

PHP SimpleXML Introduction
PHP SimpleXML函数简介

The SimpleXML functions lets you convert XML to an object.
SimpleXML函数的作用是:将XML转换成一个对象。

This object can be processed, like any other object, with normal property selectors and array iterators.
这个对象是可以被处理的,诸如其他对象一样,有数项选择器和数组声明器。

Some of these functions requires the newest PHP build.
某些函数要求最新的PHP支持。


Installation
安装

The SimpleXML functions are part of the PHP core. There is no installation needed to use these functions.
SimpleXML函数是PHP核心的一部分,因此,无需再安装这些函数。


PHP SimpleXML Functions
PHP SimpleXML函数

PHP: indicates the earliest version of PHP that supports the function.
PHP:最早支持这些函数的PHP版本

Function
参数
Description
描述
PHP
__construct() Creates a new SimpleXMLElement object
建立一个新的SimpleXMLElement对象
5
addAttribute() Adds an attribute to the SimpleXML element
将一个属性添加到SimpleXML元素中
5
addChild() Adds a child element the SimpleXML element
将一个子元素添加到SimpleXML元素中
5
asXML() Gets an XML string from a SimpleXML element
从SimpleXML元素中获取一个XML字符串
5
attributes() Gets a SimpleXML element's attributes
获取一个SimpleXML元素的属性
5
children() Gets the children of a specified node
获取一个指定节点的子节点
5
getDocNamespaces() Gets namespaces of an XML document
获取一个XML文档的名称空间[namespace]
5
getName() Gets the name of a SimpleXML element
获取SimpleXML元素的名称
5
getNamespaces() Gets namespaces from XML data
从XML数据中获取名称空间[namespace]
5
registerXPathNamespace() Creates a namespace context for the next XPath query
为接下来的XPath查询创建一个名称空间的内容[namespace]
5
simplexml_import_dom Gets a SimpleXMLElement object from a DOM node.
从一个DOM节点中获取一个SimpleXMLElement对象
5
simplexml_load_file Gets a SimpleXMLElement object from an XML document
从一个XML文档中获取一个SimpleXMLElement对象
5
simplexml_load_string Gets a SimpleXMLElement object from an XML string
从一个XML字符串中获取一个SimpleXMLElement对象
5
xpath() Runs an XPath query on XML data
运行一个与XML数据相关的XPath查询语句
5


PHP SimpleXML Constants
PHP SimpleXML常量

None无

评论 (0) All

登陆 | 还没注册?