ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: PHP :: PHP SimpleXML

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

PHP
PHP Libxml
PHP Math
PHP Misc
PHP MySQL
PHP SimpleXML
PHP String
PHP XML
PHP Zip
PHP Mail
ÓÃPHP5µÄDirector..
PHP ×èÖ¹SQL×¢ÈëÊ..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
php5ÃæÏò¶ÔÏó - »..
php5ÃæÏò¶ÔÏó - »..
ÓÃPHP¿ØÖÆÓû§µÄä..
PHP PDO ѧϰ±Ê¼Ç

PHP SimpleXML


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:5979 :: ::

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.
ijЩº¯ÊýÒªÇó×îеÄ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ÎÞ

ÆÀÂÛ (2) 1 All