Hi All,
I face a problem in using xml output stage.
I need the output as
<member>
<attname> FST_NAME </attname>
<attvalue> Abu </attvalue>
<atttype> 1 </atttype>
<phone> P </phone>
<attname> LST_NAME </attname>
<attvalue> Mamar </attvalue>
</member>
But I get it as
<member>
<attname>
FST_NAME
LST_NAME
</attname>
<attvalue>
Abu
Mamar
</attvalue>
<atttype> 1 </atttype>
<phone> P </phone>
</member>
I want FST_NAME and LST_NAME in separate tags and in the order I expect. But here it gets grouped under a single tag.
The reason is that Description is same for both FST_NAME and LST_NAME.
/member/attname/text()
Similarly
/member/attvalue/text()
Can anyone suggest me a solution.
values are combined in repetitive tags of xml output
Moderators: chulett, rschirm, roy
values are combined in repetitive tags of xml output
----------------
Abu
Abu
Another way to look at it is that it's a poorly designed document. Those are simply two instances of the same set of tags, that ought to be wrapped by some other element (like attGroup or something).
If it's only LST_NAME (and not 150 other columns also) that you have to worry about, an easy solution may be to just manually construct those few elements in a transformer and then include them in the final XMLOutput....give them a data element of XML so that they don't get tagged and include them in the proper place in the syntax by just using a .../.../.../ in the xpath.
Ernie
If it's only LST_NAME (and not 150 other columns also) that you have to worry about, an easy solution may be to just manually construct those few elements in a transformer and then include them in the final XMLOutput....give them a data element of XML so that they don't get tagged and include them in the proper place in the syntax by just using a .../.../.../ in the xpath.
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>
as I suggested, I think the easiest way to do this is to simply build the tags manually in a transformer.....simple provided that it's only a few columns. Just concatenate the values with the right tag strings and place into a string column that is pushed to XMLOutput along with your other column that works. Give it a data element of XML... takes some experimentation, but works. Look also at the Best PRactices document on Kim Duke's site (and mentioned in many other threads here), as it shows how to use the techqnique of putting together pre-constructed XML strings, albeit for a different reason.
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>