Based on what you are asking I'm assuming you are quite new to programming.

What database are you using?
Have you researched if it has any facilities for handling XML? (i.e. Oracle)

iBATIS works with objects. So, it may be wise to parse the XML into Java POJOs and then save those object into the database. After that you can select the data out into the same POJOs.

Brandon Goodin

On Mon, Apr 14, 2008 at 9:09 AM, kiran vuppla <> wrote:

I have an xml file and want to store in to an IBatis object. Please let me know if any one has any solution to write the SQL.




   <resultMap class="com.test.domain.MainModule" id="MainModuleResultObject" groupBy="id">
    <result property="modules" resultMap="module.ModuleResults"/>

   <resultMap class="com.test.domain.Module" id="ModuleResults" groupBy="id">
      <result property="id" column="ID"/>
       <result property="titleImageURL" column="IMG_URL"/>
       <result property="titleImageAltText" column="IMG_ALT_TEXT"/>
       <result property="moduleElements" resultMap="module.ModuleElementResult"/>      

   <resultMap class="com.test.domain.ModuleElement" id="ModuleElementResult">
            <result property="link" column="LINK"/>
            <result property="text" column="TEXT"/>

 If some one can help me out in writing SQL to return the result in the above format that would be grateful.

 Thanks in advance for your time.