0

As a follow-up to this question - Is there a way to get the raw XML inside an element that you select using OPENXML? Should I be using an XML datatype instead? Is there a way to get the raw XML with the XML datatype?

1 Answer 1

2

Well, with the XML datatype in SQL Server 2005 and up, you always HAVE your raw XML - no need to "get it" - it's right there, in the column, stored for your convenience.

You can of course also query it using XQuery and XPath, and even update it while it's stored inside the database!

If you can - definitely use the XML data type! You can use it "untyped" or associate it with a XML schema to add validation.

Marc

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.