Easy Tutorial
❮ Func Filesystem Fscanf Func String Mb_Substr ❯

PHP simplexml_import_dom() Function

PHP SimpleXML Reference Manual

Example

Get a DOM document node and convert it to a SimpleXML node:


Definition and Usage

The simplexml_import_dom() function returns a SimpleXMLElement object from a DOM node.


Syntax

Parameter Description
node Required. Specifies a DOM element node.
classname Optional. Specifies the class of the new object.

Technical Details

Return Value: Returns a SimpleXMLElement object if successful, FALSE otherwise.
PHP Version: 5+
--- ---

More Examples

Example 1

Output the title of the second book node in the DOM document:


❮ Func Filesystem Fscanf Func String Mb_Substr ❯