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

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 SimpleXML


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

登陆 | 还没注册?