Focal Point
iAT long string to XML

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/7231059522

May 01, 2007, 10:02 AM
tbush
iAT long string to XML
In Adapter Transformer, I have a long string in the format

HeaderData Item1DataElement1 Item1DataElement2 Item2DataElement1 Item2DataElement2

I need to transform it into XML in the format

<HeaderData>
HeaderData
</HeaderData>

<ItemData>
<Element1>
Item1DataElement1
</Element1>
<Element2>
Item1DataElement2
</Element2>
</ItemData>

<ItemData>
<Element1>
Item2DataElement1
</Element1>
<Element2>
Item2DataElement2
</Element2>
</ItemData>

The problem is that I can't figure out how to get the items into their appropriate sections. I was thinking that it would take two transforms. The first would get the data into the format

<HeaderData>
HeaderData
</HeaderData>

< Item1DataElement1>
Item1DataElement1
</Item1DataElement1>

< Item1DataElement2>
Item1DataElement2
</ Item1DataElement2>

< Item2DataElement1>
Item2DataElement1
</ Item2DataElement1>

< Item2DataElement2>
Item2DataElement2
</ Item2DataElement2>

Then I thought I could translate this to the final format, but iAT won’t let me translate both Item1DataElement1 and Item2DataElement1 into Element1.

I’m open to either a correction in my strategy or a whole new one.

This message has been edited. Last edited by: tbush,
May 18, 2007, 01:22 PM
Kerry
Hi tbush,

Our internal expert reviewed this topic and suggested that this does not seem to be something to be done naturally. For further research, a case may be of better help because we will need to see a full example with much more details.

To open a case with Information Builders' Customer Support Services, you may either call at 1-800-736-6130, or access the online system InfoResponse at http://techsupport.ibi.com. Here is a list of information to be ready when you call: http://techsupport.ibi.com/before_you_call.jsp.

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.