August 15, 2002 at 7:06 am
We currently have an application that stores data (for Office Web Components) in a Text field as XML.
Is it possible to read this using OpenXML? I have had problems as the XML document is larger than 8000 bytes and therefore cannot be stored in a varchar variable.
Many thanks, Nigel.
August 15, 2002 at 7:33 am
I think you'd have to get the data into a variable first.
Andy
August 15, 2002 at 10:15 am
As you'd probably gathered, this was the first thing that I tried to do.
The only other thought that I'd had so far would be to try to 'intelligently chop the data, then fix up the XML tags', then use OpenXML, but if I'm going to write code to do all of that, I may as well code the lot!
August 15, 2002 at 10:41 am
Cant think of a better way. Doesnt mean there isnt one!
Andy
October 12, 2002 at 9:23 am
I have posted a procedure into scripts (awaiting review) that takes a sql statement as the input an prepares the document it returns. i.e it mimicks the use of sp_xml_preparedocument
It can take a document of anysize tested upto 130Kb. It uses dynamic SQL in 2 layers and builds up the number of chops requried based on the size of the document.
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
November 23, 2002 at 4:03 am
FYI this is the script
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=589
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply