--TEST-- XMLWriter: libxml2 XML Writer, Elements & Attributes --SKIPIF-- --FILE-- \"'&"); xmlwriter_end_attribute($xw); xmlwriter_write_element($xw, 'chars', "special characters: <>\"'&"); xmlwriter_end_element($xw); xmlwriter_end_document($xw); // Force to write and empty the buffer $output = xmlwriter_flush($xw, true); print $output; ?> --EXPECT-- special characters: <>"'&