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

Reply via email to