Preview:
import com.sap.gateway.ip.core.customdev.util.Message
import groovy.util.XmlSlurper
import groovy.xml.XmlUtil

def Message processData(Message message) {
    def itemNewVal = message.getProperty('id')
    def queryUserResponse = new XmlSlurper().parseText(message.getBody(java.lang.String))
    queryUserResponse.User.Item.replaceBody(itemNewVal)
    message.setBody(XmlUtil.serialize(queryUserResponse))
    return message
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter