April 26, 2006 at 10:03 am
How do return the actual value (>, <, =)? using for xml.
April 27, 2006 at 5:51 am
Can you give an example?
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 27, 2006 at 7:38 am
Sorry Guys. Here's an example: The xml output returns the values in the operator column as ansi. Thanks for your help.
Create
table #tmpTestXML (obja varchar(10), operator char (5), objb varchar(10))
Insert into #tmpTestXML values (1, '>', 2)
Insert into #tmpTestXML values (2, '=', 2)
Insert into #tmpTestXML values (2, '<', 3)
Select
ObjA, operator, objb from #tmpTestXML for XML Auto
Output:
<
_x0023_tmpTestXML ObjA="1" operator="> " objb="2" />
<
_x0023_tmpTestXML ObjA="2" operator="= " objb="2" />
<
_x0023_tmpTestXML ObjA="2" operator="< " objb="3" />
April 27, 2006 at 7:50 am
And what do you want the output to look like?
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 27, 2006 at 7:51 am
I would like it to return '>', the symbol.
April 27, 2006 at 8:00 am
So show the whole result...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
May 16, 2006 at 6:01 pm
> I would like it to return '>', the symbol.
It can't. Not if it's returning well-formed XML. XML requires markup characters in text content to be escaped, so that the parser won't think they're markup characters. The only exception to that is CDATA, and you don't even want to think about going there.
You need to learn more about how XML parsers and DOMs work. This isn't something that you can or should fix inside the database.
Robert Rossney
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply