[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A MySQL heads-up.
At 18:21 -0500 12/2/03, Ben Trafford wrote:
Just a wee heads-up for anybody using MySQL's XML output function...it seems to export any empty field with a datatype of "text" as an empty element, rather than an element containing the NULL one might expect.
I issued these statements using mysql -X: DROP TABLE IF EXISTS t; CREATE TABLE t (tx TEXT); INSERT INTO t (tx) VALUES(''),(NULL),('some text'); SELECT tx FROM t; The result was: <?xml version="1.0"?> <resultset statement="SELECT tx FROM t"> <row> <tx></tx> </row> <row> <tx>NULL</tx> </row> <row> <tx>some text</tx> </row> </resultset> Dumping the table with mysqldump -X produces: <?xml version="1.0"?> <mysqldump> <database name="test"> <table name="t"> <row> <field name="tx"></field> </row> <row> <field name="tx">NULL</field> </row> <row> <field name="tx">some text</field> </row> </table> </database> </mysqldump>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|