February 4, 2008 at 7:05 am
In my database from my software vendor, there is a text filed but they are putting XML into this field. I would like to know if there is any way of getting this information out of the field into a workable table with the XML nodes as column headings.
February 4, 2008 at 7:48 am
I haven't tried it yet but can you do a select of the field while casting to an xml datatype?
Rob Mills
www.dotnetadvisor.comFebruary 4, 2008 at 8:06 am
Why not put the xml text into an xml data type field in another table? From there you should be able to use the many new xml tools in sql 2005 to do whatever you want to it.
I haven't learned all the ins and outs of the new xml tools, but I know it's a pretty rich feature set....
February 4, 2008 at 8:10 am
That is an option that I have thought about, I was hoping that there was another way.
February 4, 2008 at 12:48 pm
it is absolutely valid to cast the text column as xml
select x.vakue('Xpath Expression', 'datatype') extractedXmlData
from (
select cast( txtcol as xml) x from table
) data
* Noel
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply