diff --git a/reference/simplexml/functions/simplexml-import-dom.xml b/reference/simplexml/functions/simplexml-import-dom.xml new file mode 100644 index 0000000000..149fa58432 --- /dev/null +++ b/reference/simplexml/functions/simplexml-import-dom.xml @@ -0,0 +1,66 @@ + + + + + simplexml_import_dom + + Get a simplexml_element object from a + DOM node. + + + + Description + + object simplexml_elementsimplexml_load_dom + domNodenode + + + + 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;. + + + + Import DOM + +loadXML('blah'); +if (!$dom) { + echo 'Error while parsing the document'; + exit; +} + +$s = simplexml_import_dom($dom); + +echo $s->book[0]->title; // blah +?> +]]> + + + + + +