Originally posted by: Bragger
Hi,
I have 2 input cards in my WTX map. First card accepts XML file and second card is a lookup file (pipe delimited). Now I want to compare each tag name that is present in Lookup file with the xml tag names that will come in Input file 1. Wherever there is a match I need to populate the corresponding value of that tag in Output.
For e.g. - Let's say in input file 1 the tags are as below:
<Name>Tom</Name>
<Age>40</Age>
<Gender>M</Gender>
Look up file has below tags:
1|<Name>
2|<Age>
So in Output I want "Tom" and "40" to be populated because those are the only those 2 tags present in look up file. I can-not hardcode anything because look up file can change on regular basis. Tomorrow they can update the tags as "<Age>" and "<Gender>" and so on..
I tried to generate the type tree both in Classic and Xerces mode for input card 1 but I am not able to access the XML tag names like <Name>, <Age> etc. All I have access is the value of these tags. In Classic version I see that in type tree all the fields have initiator set with the tag names so don't know how to read the tag names from initiator. In Xerces mode the properties are defined as XML and still I can-not read them in map rule.
Anybody knows how to access tag names from XML in my map rule?
#DataExchange#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender