[Materials] PHP simplexml Functions

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.