on 02-02-2013 7:08 PM
Hi Experts,
In target XML file i require to insert data from various tags of source file inside 1 tag i target file. In other words, i need to put data in XML file without tags.
Target file example:
<TransactionData>
:20:DDE_0000001-000022
:32A:101207SAR5817,42
:50:Conversion Company Limited
:52A:XND111111
:53B:30111111123
:57A:SAGRES223
:59:/3010016989940
Testing Employee Bank Account
3646: Conversion Company Limited
Houston 98765
USA
:70:SC_093765
</TransactionData>
Data between :20 to :70 coming from various fields in source file but needs to be embedded in target in vaious lines under 1 tag <TransactionData>.
Can any please let me know if this can be done with any function in message mapping or XSLT mapping?
Thanks.
SM.
You can try using COPY XML Subtree feature. This would copy all the tags from the source in to one tag for the target. Please see this link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Baskar for your reply.
I went through the blog, but it says that all the children tags will be copied. In my case i don't want to display tags in target file. I just want to show the values and all the values should come in different lines under 1 tag.
Can we mask target element field names somehow?
As mentioned below, 4 fields are coming under tag <TransactionData>. But my requirement is to not to show the 4 tags and only their values are displayed like
<TransactionData>
:20:DDE_0000001-000022
:32A:101207SAR5817,42
:50:Conversion Company Limited
:52A:XND111111
<TransactionData>
Thanks.
SM.
Hi,
I tried with below input xml and xsl:
xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<Transactiondata>
<xsl:apply-templates select="root"/>
</Transactiondata>
</xsl:template>
<xsl:template match="root">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
input:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<a>123</a>
<b>456</b>
</root>
target:
<?xml version="1.0" encoding="UTF-8"?><Transactiondata>
123
456
</Transactiondata>
Please let me know your input xml for which you need to get given targer xml.
Regards,
Beena.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.