simplexml_import_dom(3) php man page | unix.com

Man Page: simplexml_import_dom

Operating Environment: php

Section: 3

SIMPLEXML_IMPORT_DOM(3) 						 1						   SIMPLEXML_IMPORT_DOM(3)

simplexml_import_dom - Get a SimpleXMLElementobject from a DOM node.

SYNOPSIS
SimpleXMLElement simplexml_import_dom (DOMNode $node, [string $class_name = "SimpleXMLElement"])
DESCRIPTION
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
o $node - A DOM Element node o $class_name - You may use this optional parameter so that simplexml_import_dom(3) will return an object of the specified class. That class should extend the SimpleXMLElement class.
RETURN VALUES
Returns a SimpleXMLElement or FALSE on failure. Warning This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE. Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.
EXAMPLES
Example #1 Importing DOM <?php $dom = new DOMDocument; $dom->loadXML('<books><book><title>blah</title></book></books>'); if (!$dom) { echo 'Error while parsing the document'; exit; } $s = simplexml_import_dom($dom); echo $s->book[0]->title; ?> The above example will output: blah
SEE ALSO
dom_import_simplexml(3), "Basic SimpleXML usage". PHP Documentation Group SIMPLEXML_IMPORT_DOM(3)
Related Man Pages
simplexmliterator(3) - php
xml::dom::text(3) - centos
simplexml_import_dom(3) - php
template::plugin::xml::dom(3pm) - debian
xacobeo::utils(3pm) - debian
Similar Topics in the Unix Linux Community
IRIX books, manuals, references...
Unix Books
little help needed with my awk
An addition for UNIX books to read
Help on Reading UNIX Programming Books.