ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: [HELP] I can't not type < sign in my sqlmap xml file
Date Thu, 19 May 2005 20:23:34 GMT
You have two options...

1) Substitute your < > with their entity counterparts &lt; and &gt;

Ex.

<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)
&lt;= 15 and TO_DAYS(NOW()) - TO_DAYS(SALEDATE) &gt; 0

and BUYERUSERID = #value#

</select>

2) Wrap you text with <![CDATA[...] ]>

Ex.

<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>

Brandon

On 5/19/05, Pham Anh Tuan <anhtuan@ichi-corp.jp> wrote:
>  
> 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