1--TEST--
2Interop Test: Import from SimpleXML
3--EXTENSIONS--
4dom
5simplexml
6--FILE--
7<?php
8$s = simplexml_load_file(__DIR__."/book.xml");
9if(!$s) {
10  echo "Error while loading the document\n";
11  exit;
12}
13$dom = dom_import_simplexml($s);
14print $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>
28