passing value as tag in xml
Posted: Mon Oct 16, 2006 5:51 am
Hi
I have a scenario where i have to pass the value of a column as tag dyanamically.
ex:
name values(abcd,xyz)
id values(11,22)
expected output should be
<work>
<abcd>
11
</abcd>
</work>
<work>
<xyz>
22
</xyz>
</work>
I have given tags as :
/root/work/@name
/root/work/value/text()
I'm getting the output as :
<work>
<name ="abcd">
<value>
11
</value>
</name>
<name ="xyz">
<value>
22
</value>
</name>
</work>
Can anyone suggest some solution for this!
thanks!
I have a scenario where i have to pass the value of a column as tag dyanamically.
ex:
name values(abcd,xyz)
id values(11,22)
expected output should be
<work>
<abcd>
11
</abcd>
</work>
<work>
<xyz>
22
</xyz>
</work>
I have given tags as :
/root/work/@name
/root/work/value/text()
I'm getting the output as :
<work>
<name ="abcd">
<value>
11
</value>
</name>
<name ="xyz">
<value>
22
</value>
</name>
</work>
Can anyone suggest some solution for this!
thanks!