ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: invalid character exception when returning an XML result object
Date Tue, 15 Mar 2005 15:48:56 GMT
"outermost element" is not a valid element name, you can't have spaces
in element names.

Clinton


On Tue, 15 Mar 2005 11:44:24 +0000, Greg.Peace@mdsuk.com
<Greg.Peace@mdsuk.com> wrote:
>  
> I'm new to this, so please forgive me if this is a daft question 
>  
> I'm trying to return an XML result object using a resultMap and I'm getting
> the following exception 
>  
> Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or
> illegal XML character is specified. 
>  
> my sql map includes: 
>  
> <resultMap  id="user-result-xml"  class="xml" xmlName="outermost element"> 
> <result property="password" column="PASSWORD" javaType="java.lang.String"/> 
> </resultMap> 
>         
> <select id="getXMLPasswordUsingUserId" parameterClass="java.lang.String"
> resultMap="user-result-xml"  > 
>         SELECT 
>         ut.password as PASSWORD 
>         FROM use_table ut 
>         WHERE                 
>         user_id = #userId# 
> </select> 
>  
> I've tried without the resultMap, ie by setting resultClass as "xml" in the
> <select> element, 
> and it works fine. I just can't get it working using the result map 
>  
> Thanks 
>  
> Greg Peace

Mime
View raw message