Explicitly flush buffer at the end of XML construction