PHP中的DOM XML函数-C#,JAVA视频教学,网页设计,网站开发,asp,php,mysql,asp.net| 学知识教程网,
设为首页|收藏学知识 |改版意见收集|智能DIY搜索|加入我们|网站地图
当前在线人数:8770
好教程 易学习 新资讯!
PHP

PHP中的DOM XML函数

2007-07-03 源自: 网友评论 共有( )条评论! 内容报错
本文章地址:http://dev.xuezhishi.net/website/PHP/2007-07-03/19013.html [将本信息与朋友分享!]

                     

 

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.

 

http://dev.xuezhishi.net/website/PHP/2007-07-03/19013.html
评论 点击查看
 


加入QQ群:35714363 一起成长
我要加入更多群 我有意见要反映
开发教室

学知识原创教程下载

本类最近更新
阅读排行

其他相关信息