SimpleXMLElement::getName

(PHP 5 >= 5.1.3, PHP 7) Gets the name of the XML element public string SimpleXMLElement::getName ( void ) Gets the name of the XML element. Returns: The getName method returns as a string the name of the XML tag referenced by the SimpleXMLElement object. Examples: Get XML element names Note: Listed examples may includ

SimpleXMLElement::getNamespaces

(PHP 5 >= 5.1.2, PHP 7) Returns namespaces used in document public array SimpleXMLElement::getNamespaces ([ bool $recursive = false ] ) Returns namespaces used in document Parameters: recursive If specified, returns all namespaces used in parent and child nodes. Otherwise, returns only namespaces used in root node. Returns: The getNamespace

SimpleXMLElement::__toString

(No version information available, might only be in Git) Returns the string content public string SimpleXMLElement::__toString ( void ) Returns text content that is directly in this element. Does not return text content that is inside this element's children. Returns: Returns the string content on success or an empty string on failure. Examples:

SimpleXMLElement::xpath

(PHP 5 >= 5.2.0, PHP 7) Runs XPath query on XML data public array SimpleXMLElement::xpath ( string $path ) The xpath method searches the SimpleXML node for children matching the XPath path. Parameters: path An XPath path Returns: Returns an array of SimpleXMLElement objects or FALSE in case of an error.

SimpleXMLElement::attributes

(PHP 5 >= 5.0.1, PHP 7) Identifies an element's attributes public SimpleXMLElement SimpleXMLElement::attributes ([ string $ns = NULL [, bool $is_prefix = false ]] ) This function provides the attributes and values defined within an xml tag. Note: SimpleXML has made a rule of adding iterative properties to most methods. They cannot be viewed using var_dump() or anything else which can examine objects. Pa

SimpleXMLElement::count

(PHP 5 >= 5.3.0, PHP 7) Counts the children of an element public int SimpleXMLElement::count ( void ) This method counts the number of children of an element. Returns: Returns the number of elements of an element. Examples: Counting the number of children <?php $xml = <<<EOF <people>  <person name=

SimpleXMLElement::children

(PHP 5 >= 5.0.1, PHP 7) Finds children of given node public SimpleXMLElement SimpleXMLElement::children ([ string $ns [, bool $is_prefix = false ]] ) This method finds the children of an element. The result follows normal iteration rules. Note: SimpleXML has made a rule of adding iterative properties to most methods. They cannot be viewed using var_dump() or anything else which can examine objects. Param

SimpleXMLElement::__construct

(PHP 5 >= 5.0.1, PHP 7) Creates a new SimpleXMLElement object final public SimpleXMLElement::__construct ( string $data [, int $options = 0 [, bool $data_is_url = false [, string $ns = "" [, bool $is_prefix = false ]]]] ) Creates a new SimpleXMLElement object. Parameters: data A well-formed XML string or the path or URL to an XML document if data_is_url is TRUE.

SimpleXMLElement::getDocNamespaces

(PHP 5 >= 5.1.2, PHP 7) Returns namespaces declared in document public array SimpleXMLElement::getDocNamespaces ([ bool $recursive = false [, bool $from_root = true ]] ) Returns namespaces declared in document Parameters: recursive If specified, returns all namespaces declared in parent and child nodes. Otherwise, returns only namespaces declared in root node.

SimpleXMLElement::addChild

(PHP 5 >= 5.1.3, PHP 7) Adds a child element to the XML node public SimpleXMLElement SimpleXMLElement::addChild ( string $name [, string $value [, string $namespace ]] ) Adds a child element to the node and returns a SimpleXMLElement of the child. Parameters: name The name of the child element to add. value If specified, the value