Annotation of embedaddon/php/ext/dom/tests/dom_import_simplexml.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Interop Test: Import from SimpleXML
3: --SKIPIF--
4: <?php require_once('skipif.inc'); ?>
5: <?php if (!extension_loaded('simplexml')) die('skip simplexml extension not available');?>
6: --FILE--
7: <?php
8: $s = simplexml_load_file(dirname(__FILE__)."/book.xml");
9: if(!$s) {
10: echo "Error while loading the document\n";
11: exit;
12: }
13: $dom = dom_import_simplexml($s);
14: print $dom->ownerDocument->saveXML();
15: ?>
16: --EXPECT--
17: <?xml version="1.0"?>
18: <books>
19: <book>
20: <title>The Grapes of Wrath</title>
21: <author>John Steinbeck</author>
22: </book>
23: <book>
24: <title>The Pearl</title>
25: <author>John Steinbeck</author>
26: </book>
27: </books>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>