You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Pham Anh Tuan <an...@ichi-corp.jp> on 2005/05/19 11:06:08 UTC
[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
Re: [HELP] I can't not type < sign in my sqlmap xml file
Posted by Brandon Goodin <br...@gmail.com>.
You have two options...
1) Substitute your < > with their entity counterparts < and >
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)
<= 15 and TO_DAYS(NOW()) - TO_DAYS(SALEDATE) > 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 <an...@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
Re: [HELP] I can't not type < sign in my sqlmap xml file
Posted by User Coyo <co...@irresponsiblecybernetics.com>.
Hello Anh,
I think you want to use < rather than <. SqlMaps will understand.
Also use > instead of >
-Wolf
On Thu, 19 May 2005, Pham Anh Tuan 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
>
RE: [HELP] I can't not type < sign in my sqlmap xml file
Posted by Lieven De Keyzer <li...@hotmail.com>.
use the entity reference < instead
>From: "Pham Anh Tuan" <an...@ichi-corp.jp>
>Reply-To: ibatis-user-java@incubator.apache.org
>To: <ib...@incubator.apache.org>
>Subject: [HELP] I can't not type < sign in my sqlmap xml file
>Date: Thu, 19 May 2005 16:06:08 +0700
>
>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