(no version information, might be only in CVS)

simplexml_import_dom --  Get a simplexml_element object from a DOM node.


object simplexml_element simplexml_import_dom ( domNode node)

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. If any errors occur, it returns FALSE.

例子 1. Import DOM

= new domDocument;
if (!
$dom) {
'Error while parsing the document';

$s = simplexml_import_dom($dom);

$s->book[0]->title; // blah

虎的笑话 虎的成语 虎的歇后语