Using Ibatis 1
1.mapping file: site.xml [code="xml"] Select SITEID,ITEMNAME,ITEMVALUE from siteConfig update siteConfig set ITEMVALUE=#itemvalue# where SITEID = #siteid# and ITEMNAME=#itemname# insert into siteConfig(SITEID,ITEMNAME,ITEMVALUE) values(#siteid#,#itemname#,#itemvalue#) insert into siteConfig(ITEMNAME,ITEMVALUE) values(#itemname#,#itemvalue#) insert into siteConfig(SITEID,ITEMNAME,ITEMVALUE) values(#siteID#,#itemName#,#itemValue#) insert into siteConfig(SITEID,ITEMNAME,ITEMVALUE) values(?,?,?) delete from siteConfig where siteID = #siteid# [/code] 2. employee.xml [code="xml"] Select * from Employee [/code]