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

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

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