ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elizabeth Baron" <EBa...@poindextersystems.com>
Subject RE: [HELP] I can't not type < sign in my sqlmap xml file
Date Thu, 19 May 2005 20:12:29 GMT
Hi Anh,

 

If I understand what you are saying, you need to use the "<" character
in your iBatis map.  This is possible by using the CDATA tags.  I have
included an example below.  The only problem I see with CDATA is that
you might not be able to use dynamic sql in the future.

 

Does anyone know?

 

Thanks,

Liz

<select id="getNOFBidding" resultClass="int" parameterClass="string">

<![CDATA[

select COUNT(distinct ITEMID) 

from SALE 

where SALESTATUS = 0 and MAXPRICE = 1 

and TO_DAYS(NOW()) - TO_DAYS(SALEDATE) <= 15 and TO_DAYS(NOW()) -
TO_DAYS(SALEDATE) > 0 

and BUYERUSERID = #value#

]]>

</select>

 

 

________________________________

From: Pham Anh Tuan [mailto:anhtuan@ichi-corp.jp] 
Sent: Thursday, May 19, 2005 5:06 AM
To: ibatis-user-java@incubator.apache.org
Subject: [HELP] I can't not type < sign in my sqlmap xml file

 

Hi,

 

I can't not type < sign in sql definition xml file, I don't know why,
plz help me solve this problem :(

 

<select id="getNOFBidding" resultClass="int" parameterClass="string">

select COUNT(distinct ITEMID) 

from SALE 

where SALESTATUS = 0 and MAXPRICE = 1 

and TO_DAYS(NOW()) - TO_DAYS(SALEDATE) <= 15 and TO_DAYS(NOW()) -
TO_DAYS(SALEDATE) > 0 

and BUYERUSERID = #value#

</select>

report error: The content of elements must consist of well-formed
character data or markup

Thanks for reading

Anh Tuan


Mime
View raw message