Annotation of embedaddon/php/ext/xmlwriter/tests/OO_006.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: XMLWriter: libxml2 XML Writer, startDTD/writeElementNS
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded("xmlwriter")) die("skip");
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: /* $Id: OO_006.phpt 202733 2005-12-12 21:21:11Z tony2001 $ */
! 10:
! 11: $doc_dest = '001.xml';
! 12: $xw = new XMLWriter();
! 13: $xw->openUri($doc_dest);
! 14: $xw->startDtd('foo', NULL, 'urn:bar');
! 15: $xw->endDtd();
! 16: $xw->startElement('foo');
! 17: $xw->writeElementNS('foo', 'bar', 'urn:foo', 'dummy content');
! 18: $xw->endElement();
! 19:
! 20: // Force to write and empty the buffer
! 21: $output_bytes = $xw->flush(true);
! 22: echo file_get_contents($doc_dest);
! 23: unset($xw);
! 24: unlink('001.xml');
! 25: ?>
! 26: --EXPECT--
! 27: <!DOCTYPE foo SYSTEM "urn:bar"><foo><foo:bar xmlns:foo="urn:foo">dummy content</foo:bar></foo>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>