ArticleDirectory
- Introduction to PhP simplexml
Introduction to PhP simplexml
The simplexml function allows you to convert XML into objects.
This object can be processed by using a common attribute selector or array iterator, just like any other object.
Some of these functions require the latest PHP version.
Simplexml functions are a core component of PHP. These functions can be used without installation.
| Function |
Description |
PHP |
| _ Construct () |
Create a new simplexmlelement object. |
5 |
| Addattribute () |
Add an attribute to the simplexml element. |
5 |
| Addchild () |
Add a child element to the simplexml element. |
5 |
| Asxml () |
Obtain the XML string from the simplexml element. |
5 |
| Attributes () |
Obtain the attributes of the simplexml element. |
5 |
| Children () |
Obtains the child of a specified node. |
5 |
| Getdocnamespaces () |
Obtain the namespace of an XML document. |
5 |
| Getname () |
Obtain the name of the simplexml element. |
5 |
| Getnamespaces () |
Get the namespace from XML data. |
5 |
| Registerxpathnamespace () |
Create a namespace context for the next XPath query. |
5 |
| Simplexml_import_dom () |
Obtain the simplexmlelement object from the DOM node. |
5 |
| Simplexml_load_file () |
Obtain the simplexmlelement object from the XML document. |
5 |
| Simplexml_load_string () |
Obtain the simplexmlelement object from an XML string. |
5 |
| XPath () |
Run XPath query on XML data. |
5 |