PHP中的DOMXML函数
程序员文章站
2024-02-16 20:21:52
...
DOM XML functions
These functions are only available if PHP was configured with --with-dom=[DIR], using the GNOME xml library. You will need at least libxml-2.0.0 (the beta version will not work). These functions have been added in PHP4.
This module defines the following constants:
Table 1. XML constants
Constant Value Description
XML_ELEMENT_NODE 1
XML_ATTRIBUTE_NODE 2
XML_TEXT_NODE 3
XML_CDATA_SECTION_NODE 4
XML_ENTITY_REF_NODE 5
XML_ENTITY_NODE 6
XML_PI_NODE 7
XML_COMMENT_NODE 8
XML_DOCUMENT_NODE 9
XML_DOCUMENT_TYPE_NODE 10
XML_DOCUMENT_FRAG_NODE 11
XML_NOTATION_NODE 12
XML_GLOBAL_NAMESPACE 1
XML_LOCAL_NAMESPACE 2
This module defines a number of classes. The DOM XML functions return a parsed tree of the XML document with each node being an object belonging to one of these classes.
xmldoc
(PHP4 >= 4.0b4)
xmldoc -- Creates a DOM object of an XML document
Description
object xmldoc (string str)
The function parses the XML document in str and returns an object of class "Dom document", having the properties "doc" (resource), "version" (string) and "type" (long).
xmldocfile
(PHP4 >= 4.0b4)
xmldocfile -- Creates a DOM object from XML file
Description
object xmldocfile (string filename)
The function parses the XML document in the file named filename and returns an object of class "Dom document", having the properties "doc" (resource), "version" (string).
xmltree
(PHP4 >= 4.0b4)
xmltree -- Creates a tree of php objects from XML document
Description
object xmltree (string str)
The function parses the XML document in str and returns a tree PHP objects as the parsed document.
These functions are only available if PHP was configured with --with-dom=[DIR], using the GNOME xml library. You will need at least libxml-2.0.0 (the beta version will not work). These functions have been added in PHP4.
This module defines the following constants:
Table 1. XML constants
Constant Value Description
XML_ELEMENT_NODE 1
XML_ATTRIBUTE_NODE 2
XML_TEXT_NODE 3
XML_CDATA_SECTION_NODE 4
XML_ENTITY_REF_NODE 5
XML_ENTITY_NODE 6
XML_PI_NODE 7
XML_COMMENT_NODE 8
XML_DOCUMENT_NODE 9
XML_DOCUMENT_TYPE_NODE 10
XML_DOCUMENT_FRAG_NODE 11
XML_NOTATION_NODE 12
XML_GLOBAL_NAMESPACE 1
XML_LOCAL_NAMESPACE 2
This module defines a number of classes. The DOM XML functions return a parsed tree of the XML document with each node being an object belonging to one of these classes.
xmldoc
(PHP4 >= 4.0b4)
xmldoc -- Creates a DOM object of an XML document
Description
object xmldoc (string str)
The function parses the XML document in str and returns an object of class "Dom document", having the properties "doc" (resource), "version" (string) and "type" (long).
xmldocfile
(PHP4 >= 4.0b4)
xmldocfile -- Creates a DOM object from XML file
Description
object xmldocfile (string filename)
The function parses the XML document in the file named filename and returns an object of class "Dom document", having the properties "doc" (resource), "version" (string).
xmltree
(PHP4 >= 4.0b4)
xmltree -- Creates a tree of php objects from XML document
Description
object xmltree (string str)
The function parses the XML document in str and returns a tree PHP objects as the parsed document.
推荐阅读
-
PHP中的DOMXML函数
-
php获取post中的json数据的实现方法
-
destoon安全设置中需要设置可写权限的目录及文件_php实例
-
PHP中set error handler函数用法小结,sethandler_PHP教程
-
PHP中把对象数组转换成普通数组的方法
-
php获取、检查类名、函数名、方法名的函数方法
-
php5连接mssql2005数据库表中的image字段图片显示解决办法
-
Java与Scala中的闭包 博客分类: 函数式语言 JavaScalajava7SQLJDK
-
WordPress中转义HTML与过滤链接的相关PHP函数使用解析
-
PHP 的异常处理、错误的抛出及回调函数等面向对象的错误处理方法