I'm trying to create and xml representation of many tables (1 to many relationships). I've found the easiest way to do this is using the "for xml raw, elements" clause. All of the more advanced techniques involve creating a schema which I would like to avoid if possible. The only problem I ran into using "for xml raw, elements" is that it is encoding all punctuation marks in my text.
For example I have a varchar field called ProductCode which equals "E&O". I expected the resulting xml element to be
Instead I got
Is there any setting that will prevent this translation?
For example I have a varchar field called ProductCode which equals "E&O". I expected the resulting xml element to be
Code:
<ProductCode>E&O</ProductCode>
Code:
<ProductCode>E&O</ProductCode>