Hi All,
My xml file look like below,
<Parent>
<Id>A1</Id>
<Sid>A1id</Sid>
<Group>
<lov type="time">
<id1>1</id1>
<desc>US</desc>
</lov>
<lov type="loc">
<id1>2</id1>
<desc>US</desc>
</lov>
</Group>
</Parent
<Parent>
<Id>B1</Id>
<Sid>B1id</Sid>
<Group>
<lov type="time">
<id1>11</id1>
<desc>US</desc>
</lov>
<lov type="loc">
<id1>12</id1>
<desc>US</desc>
</lov>
</Group>
</Parent
and if i take the
1. "id" as the key field (repetition element), from the lov type one is missed out. Only "time" has been take for processing. and "loc" has been dropped.
2. But if i take the "type" as the key field i am getting the id value same for all the records.
Let me know if transformations are needed.
Please help me to solve this issue.
Thanks!
XML transformation issue
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 39
- Joined: Tue Feb 28, 2012 12:59 pm
- Location: Chennai
Choose id1 or desc as your repeating element. If they both appear ALL the time, it should be fine. If you fear that one or the other might not exist, uncheck "repetition element required".
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>
-
- Participant
- Posts: 39
- Joined: Tue Feb 28, 2012 12:59 pm
- Location: Chennai
One more finding,
When i keep the "id" field as the last field in the transformations it is working fine with key field as "type". Now i am getting all the "type" data and corresponding id field also populated correctly.
Before "id" was the first field in the transformation and only the first id value has been populated for all the records.
Any idea how it works. TIA.
When i keep the "id" field as the last field in the transformations it is working fine with key field as "type". Now i am getting all the "type" data and corresponding id field also populated correctly.
Before "id" was the first field in the transformation and only the first id value has been populated for all the records.
Any idea how it works. TIA.
Hard to say. It generates xslt. Perhaps the change in order impacts the generated xslt. Either way, I always try, as a best practice, to keep the elements in the order of their placement in the hierarchy....with the most deeply nested elements and attributes at the bottom of the link column list.
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>