1--TEST--
2DOMDocument::$preserveWhiteSpace - test ability to read and write property
3--CREDITS--
4Lev Radin <prokurator@gmail.com>
5# TestFest 2009 NYPHP
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8--FILE--
9<?php
10
11echo "Load document with preserveWhiteSpace on\n";
12$doc = new DOMDocument;
13$doc->load(dirname(__FILE__)."/book.xml");
14echo $doc->saveXML();
15
16
17echo "\nLoad document with preserveWhiteSpace off\n";
18$doc = new DOMDocument;
19$doc->preserveWhiteSpace = false;
20$doc->load(dirname(__FILE__)."/book.xml");
21echo $doc->saveXML();
22
23?>
24--EXPECT--
25Load document with preserveWhiteSpace on
26<?xml version="1.0"?>
27<books>
28 <book>
29  <title>The Grapes of Wrath</title>
30  <author>John Steinbeck</author>
31 </book>
32 <book>
33  <title>The Pearl</title>
34  <author>John Steinbeck</author>
35 </book>
36</books>
37
38Load document with preserveWhiteSpace off
39<?xml version="1.0"?>
40<books><book><title>The Grapes of Wrath</title><author>John Steinbeck</author></book><book><title>The Pearl</title><author>John Steinbeck</author></book></books>
41