--TEST--
XMLWriter: libxml2 XML Writer, writeAttributeNS method
--CREDITS--
Mauricio Vieira <mauricio [at] @mauriciovieira [dot] net>
#testfest PHPSP on 2014-07-05
--SKIPIF--
<?php
if (!extension_loaded("xmlwriter")) die("skip");
if (LIBXML_VERSION < 20617) die("skip: libxml2 2.6.17+ required");
?>
--FILE--
<?php
$xw = new XMLWriter();
$xw->openMemory();
$xw->setIndent(TRUE);
$xw->setIndentString(' ');
$xw->startDocument('1.0', "UTF-8");
$xw->startElement('root');
$xw->startElementNS('ns1', 'child1', 'urn:ns1');
$xw->writeAttributeNS('ns1', 'att1', 'urn:ns1', '<>"\'&');
$xw->writeElement('chars', "special characters: <>\"'&");
$xw->endElement();
$xw->endDocument();
$output = $xw->flush(true);
print $output;
?>
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
<root>
<ns1:child1 ns1:att1="<>"'&" xmlns:ns1="urn:ns1">
<chars>special characters: <>"'&</chars>
</ns1:child1>
</root>