xref: /PHP-5.3/ext/xmlwriter/tests/002.phpt (revision bcd9356d)
1--TEST--
2XMLWriter: libxml2 XML Writer, membuffer, flush
3--SKIPIF--
4<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
5--FILE--
6<?php
7/* $Id$ */
8
9$doc_dest = '001.xml';
10$xw = xmlwriter_open_memory($doc_dest);
11xmlwriter_start_document($xw, '1.0', 'UTF-8');
12xmlwriter_start_element($xw, "tag1");
13xmlwriter_end_document($xw);
14
15// Force to write and empty the buffer
16echo xmlwriter_flush($xw, true);
17?>
18===DONE===
19--EXPECT--
20<?xml version="1.0" encoding="UTF-8"?>
21<tag1/>
22===DONE===
23