on 09-07-2016 1:49 PM
Hello experts
I have following requirements. Please suggest to resolve it.
Source : <ParentNode>
<Field1>
<Field2>
<Field3>
<Field4>
<Field5>
<Field6>
<Field7>
<Field8>
<ParentNode>
Target: <ParentNode>
<Field3>
<Field5>
<Field3>
<Field5>
<ParentNode>
I have given you source structure.. And me desired target is given.. Please help me how to achieve this..
Regards
Amarnath..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amarnath!
Actualy, there is one one "tricky" way to achieve your requirement.
1. Change UDF code to this:
2. Use following mapping:
All your "Field" elements in this mapping should be used with option "Return as XML". And standard function "replaceString" is intended for removing <?xml version="1.0" encoding="UTF-8"?> XML declaration from concatenated tree fragment.
Result:
Regards, Evgeniy.
The following XSLT should work:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="ParentNode">
<xsl:copy>
<xsl:copy-of select="Field3"/>
<xsl:copy-of select="Field5"/>
<xsl:copy-of select="Field3"/>
<xsl:copy-of select="Field5"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Amarnath,
Try like below
Field3---->CopyValue---->Field3
If you wish to copy the first value only.
If you can post the queue value can assist further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amarnath,
Meaning the one thing you are looking for is this output ordering?
field3
field5
field3
field5
instead of:
field3
field3
field5
field5
If so, you would need to write some special UDF logic as part of a graphical mapping, a java mapping, or some combination of both to achieve that.
Regards,
Ryan Crosby
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.