Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / dom / tests / dom_import_simplexml.phpt
blob81744aa260085d6c25a589e3d547bf2b8a78ff22
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;
13 $dom = dom_import_simplexml($s);
14 print $dom->ownerDocument->saveXML();
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>