$output_bytes = xmlwriter_flush($xw, true);
echo file_get_contents($doc_dest);
unlink('001.xml');
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8"?>
<tag1/>
----Done---
+===DONE===
// Force to write and empty the buffer
echo xmlwriter_flush($xw, true);
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8"?>
<tag1/>
----Done---
+===DONE===
// Force to write and empty the buffer
echo xmlwriter_flush($xw, true);
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8"?>
<tag1 attr1="attr1_value" att2="att2_value">Test text for tag1<tag2/></tag1>
----Done---
+===DONE===
} else {
echo "ok.\n";
}
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
ok.
----Done---
+===DONE===
--TEST--
XMLWriter: libxml2 XML Writer, comments
--SKIPIF--
-<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
+<?php
+if (!extension_loaded("xmlwriter")) die("skip");
+if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ required");
+?>
--FILE--
<?php
/* $Id$ */
$output_bytes = xmlwriter_flush($xw, true);
echo file_get_contents($doc_dest);
unlink('001.xml');
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8"?>
<tag1><!--comment--><!--comment #2--></tag1>
----Done---
+===DONE===
$output_bytes = $xw->flush(true);
echo file_get_contents($doc_dest);
unlink('001.xml');
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8" standalone="standalonearg"?>
<tag1/>
----Done---
+===DONE===
// Force to write and empty the buffer
echo $xw->flush(true);
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8" standalone="standalone"?>
<tag1/>
----Done---
+===DONE===
// Force to write and empty the buffer
echo $xw->flush(true);
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8"?>
<tag1 attr1="attr1_value" attr2="attr2_value">Test text for tag1<tag2/></tag1>
----Done---
+===DONE===
} else {
echo "ok.\n";
}
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
ok.
----Done---
+===DONE===
--TEST--
XMLWriter: libxml2 XML Writer, comments
--SKIPIF--
-<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
+<?php
+if (!extension_loaded("xmlwriter")) die("skip");
+if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ required");
+?>
--FILE--
<?php
/* $Id$ */
$output_bytes = $xw->flush(true);
echo file_get_contents($doc_dest);
unlink('001.xml');
-echo "---Done---\n";
?>
+===DONE===
--EXPECT--
<?xml version="1.0" encoding="utf8"?>
<tag1><!--comment--><!--comment #2--></tag1>
----Done---
+===DONE===