Wasabi Posted May 28, 2011 Share Posted May 28, 2011 Could someone illustrate usage of the SQL XML datatype? attempting to wrap my head around the concept, but have found most of the web examples a bit esoteric. The forum usually provides more succinct examples. Link to comment Share on other sites More sharing options...
HartleySan Posted May 30, 2011 Share Posted May 30, 2011 I am a little unclear on what you're referring to, but if you're talking about dealing with XML data in MySQL, I found the following, which might be helpful: http://dev.mysql.com/tech-resources/articles/xml-in-mysql5.1-6.0.html I actually don't generally deal with XML data, as it can introduce a lot of overhead. Nevertheless, I suppose another option might be to store the XML data as a standard string in the database, and then use some sort of PHP library that can interpret that string data as XML data and perform appropriate DOM functions on it from there. Again, I'm not actually sure what you're asking for, nor do I have much experience with XML in PHP. Sorry. 1 Link to comment Share on other sites More sharing options...
Wasabi Posted May 31, 2011 Author Share Posted May 31, 2011 Encountered the datatype at W3Schools began looking at on-line tutorials and documentation. Became concerned about overhead as you mentioned. Other data types: Data type Description sql_variant: Stores up to 8,000 bytes of data of various data types, except text, ntext, and timestamp uniqueidentifier: Stores a globally unique identifier (GUID) xml: Stores XML formatted data. Maximum 2GB cursor: Stores a reference to a cursor used for database operations table: Stores a result-set for later processing Link to comment Share on other sites More sharing options...
Larry Posted June 1, 2011 Share Posted June 1, 2011 It's just for storing XML data. Presumably this is supported by database applications that have native XML functionality because, for example, you could store XML in a MySQL database in a text column, then manipulate that XML as XML using PHP. Link to comment Share on other sites More sharing options...
Recommended Posts