1--TEST--
2xmlwriter_write_attribute_ns basic function tests
3--EXTENSIONS--
4xmlwriter
5--FILE--
6<?php
7$xw = xmlwriter_open_memory();
8xmlwriter_set_indent($xw, TRUE);
9xmlwriter_start_document($xw, NULL, "UTF-8");
10xmlwriter_start_element($xw, 'root');
11xmlwriter_write_attribute_ns($xw, 'prefix', 'id', 'http://www.php.net/uri', 'elem1');
12xmlwriter_start_element($xw, 'elem1');
13xmlwriter_write_attribute($xw, 'attr1', 'first');
14xmlwriter_end_element($xw);
15xmlwriter_full_end_element($xw);
16xmlwriter_end_document($xw);
17
18$output = xmlwriter_flush($xw, true);
19print $output;
20?>
21--CREDITS--
22Koen Kuipers koenk82@gmail.com
23--EXPECT--
24<?xml version="1.0" encoding="UTF-8"?>
25<root prefix:id="elem1" xmlns:prefix="http://www.php.net/uri">
26 <elem1 attr1="first"/>
27</root>
28