SQL to XML Converter

SQL INSERT rows as XML

The XML has a <database> root, one element per table and a <row> per inserted row, with each column as a child element. Text is escaped and NULL becomes an empty element marked xsi:nil="true". INSERT INTO t (id) VALUES (1); produces <t><row><id>1</id></row></t> inside the root.