We were required to store the data(merge of two source columns) in xml format of a target table column.
The Req is like this
Source table has columns like A,B and C. Target table has two columns A and D. col A directly can map to target A but source B need to be display in first line and col C in second line of the target coulmn D. The data type of col D is CLOB.hope i have given clear information.
Source:
A B C
10 20 30
Target required format:
A-------------D
10-------<'B> 20 <\B>
----------<C> 30 </C>
any advise regarding the above. Thanks
XML Format output
Moderators: chulett, rschirm, roy
to confirm.....the target that you are looking for is not really "xml"...just that you have certain chunks inside of the target that are "formatted like xml tags"?
...based on what you have below, I'd just use a Transformer and build the string that you need.
How many columns are there? If in fact, there are 20 or 30 B and C columns that need xml tags, then I'd craft a way to use the xml stage, but for only 2 to maybe 10, a transformer is just as easy, especially if you are needing to care about the crlf's..... are the exactly line formats important?
Ernie
...based on what you have below, I'd just use a Transformer and build the string that you need.
How many columns are there? If in fact, there are 20 or 30 B and C columns that need xml tags, then I'd craft a way to use the xml stage, but for only 2 to maybe 10, a transformer is just as easy, especially if you are needing to care about the crlf's..... are the exactly line formats important?
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
and it's just those two columns? Build the xml string in a transformer. Don't waste your time with the xmlOutput Stage. It does far more than you need here for this solution.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Just build them together as one line, formatting like that is just for peoples and will not affect any XML parser. If for some reason you really think you need to do this, concatenate a <CR> between the two elements:
Code: Select all
FirstTag : Char(13) : SecondTag
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers