simplexml_import_dom

(PHP 5, PHP 7) Get a SimpleXMLElement object from a DOM node. SimpleXMLElement simplexml_import_dom ( DOMNode $node [, string $class_name = "SimpleXMLElement" ] ) This function takes a node of a DOM document and makes it into a SimpleXML node. This new object can then be used as a native SimpleXML element. Parameters: node A DOM Element node class_

SimpleXMLIterator::next

(PHP 5 >= 5.1.0, PHP 7) Move to next element public void SimpleXMLIterator::next ( void ) This method moves the SimpleXMLIterator to the next element. Returns: No value is returned. Examples: Move to the next element <?php $xmlIterator = new SimpleXMLIterator('<books><book>PHP Basics</book><boo

SimpleXMLIterator::valid

(PHP 5 >= 5.1.0, PHP 7) Check whether the current element is valid public bool SimpleXMLIterator::valid ( void ) This method checks if the current element is valid after calls to SimpleXMLIterator::rewind() or SimpleXMLIterator::next(). Returns: Returns TRUE if the current element is valid, otherwise FALSE Examples: Check whether th

SimpleXMLIterator::rewind

(PHP 5 >= 5.1.0, PHP 7) Rewind to the first element public void SimpleXMLIterator::rewind ( void ) This method rewinds the SimpleXMLIterator to the first element. Returns: No value is returned. Examples: Rewind to the first element <?php $xmlIterator = new SimpleXMLIterator('<books><book>PHP Basics</

SimpleXMLIterator::key

(PHP 5 >= 5.1.0, PHP 7) Return current key public mixed SimpleXMLIterator::key ( void ) This method gets the XML tag name of the current element. Returns: Returns the XML tag name of the element referenced by the current SimpleXMLIterator object or FALSE Examples: Get the current XML tag key <?php $xmlIterator = new

SimpleXMLIterator::current

(PHP 5 >= 5.1.0, PHP 7) Returns the current element public mixed SimpleXMLIterator::current ( void ) This method returns the current element as a SimpleXMLIterator object or NULL. Returns: Returns the current element as a SimpleXMLIterator object or NULL on failure. Examples: Return the current element <?php $xmlIte

SimpleXMLIterator::hasChildren

(PHP 5 >= 5.1.0, PHP 7) Checks whether the current element has sub elements. public bool SimpleXMLIterator::hasChildren ( void ) This method checks whether the current SimpleXMLIterator element has sub-elements. Returns: TRUE if the current element has sub-elements, otherwise FALSE Examples: Check whether the current element has sub

SimpleXMLIterator::getChildren

(PHP 5 >= 5.1.0, PHP 7) Returns the sub-elements of the current element public SimpleXMLIterator SimpleXMLIterator::getChildren ( void ) This method returns a SimpleXMLIterator object containing sub-elements of the current SimpleXMLIterator element. Returns: Returns a SimpleXMLIterator object containing the sub-elements of the current element. E

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::saveXML

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