SurajRajesh
SurajRajesh

Reputation: 109

How to use less than < and greater than > symbols in xml query?

How to use less than < and greater than > symbols in XML instead of &lt and &gt

<Query>select * from tbl_reservation where fair > 1000 and fair < 50000</Query>

Upvotes: 2

Views: 3266

Answers (1)

Mads Hansen
Mads Hansen

Reputation: 66723

You could use a CDATA section, which allows for characters to be included without being escaped:

<Query><![CDATA[select * from tbl_reservation where fair > 1000 and fair < 50000]]></Query>

However, if you are using XML tools to construct your XML, they will handle the character escaping of text() values.

Upvotes: 2

Related Questions