SimpleXMLElement::saveXML

(PHP 5 >= 5.2.0, PHP 7) Alias of SimpleXMLElement::asXML() This method is an alias of: SimpleXMLElement::asXML()

SimpleXMLElement::registerXPathNamespace

(PHP 5 >= 5.2.0, PHP 7) Creates a prefix/ns context for the next XPath query public bool SimpleXMLElement::registerXPathNamespace ( string $prefix, string $ns ) Creates a prefix/ns context for the next XPath query. In particular, this is helpful if the provider of the given XML document alters the namespace prefixes. registerXPathNamespace will create a prefix for the associated namespace, allowing one to access nodes i

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::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::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::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::__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::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::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::asXML

(PHP 5 >= 5.0.1, PHP 7) Return a well-formed XML string based on SimpleXML element public mixed SimpleXMLElement::asXML ([ string $filename ] ) The asXML method formats the parent object's data in XML version 1.0. Parameters: filename If specified, the function writes the data to the file rather than returning it. Returns: If the filename is