Showing results for 
Search instead for 
Did you mean: 

Creating nodes in the message at runtime

Former Member
0 Kudos

Hi All,

Source structure of my message is :



0 to unbounded


Target Structure :



0 to unbounded


Now my requirement is such that....if the source message has 3 Query elements then XI should generate key node in target message 3 times but with names key1,key2,key3.

I am not able to set the names of these target nodes at runtime based on the number of query elements in source message.

Can anybody please help me?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos


YOu can not change the names of your "Fields".


If you want to change Value you can do that by writing UDF.

Enter this code in UDF.

for(int i=0;i<a.length();i++)





Akshay Jamgoankar.

    • Reward points if find useful.

Former Member
0 Kudos


can you make use of xslt mapping or java mapping

try this xslt code

<?xml version='1.0'?>

<xsl:stylesheet version="1.0" xmlns:xsl="">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">


<xsl:apply-templates select="//Query[1]"></xsl:apply-templates>



<xsl:template match="Query" name="call">

<xsl:param name="count" select="1"></xsl:param>

<xsl:element name="Key{$count}">

<xsl:value-of select="."></xsl:value-of>


<xsl:apply-templates select="following::Query[1]">

<xsl:with-param name="count" select="$count + 1"></xsl:with-param>