Jump to content
Larry Ullman's Book Forums

Recommended Posts

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

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.

  • Upvote 1
Link to comment
Share on other sites

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

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

 Share

×
×
  • Create New...