Hi,
I try to understand how the XML Output Stage works, and I have this problem.
This is the output I'm able to generate:
<directory>
<customer name="Acme">
<division>
Toys
</division>
<city>
Boston
</city>
<city>
New York
</city>
</customer>
<customer name="Acme">
<division>
Chemical
</division>
<city>
Raleigh
</city>
<city>
St-Louis
</city>
</customer>
</directory>
and this is what I want to generate:
<directory>
<customer name="Acme">
<division>Toys</division>
<city>Boston</city>
<city>New York</city>
</customer>
<customer name="Acme">
<division>Chemical</division>
<city>Raleigh</city>
<city>St-Louis</city>
</customer>
</directory>
Please help me.
Thanks
Eric
XML File Format
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can't specify that in a XML stage. But you could write relatively simple job which reads each line and adds it to an output buffer, which is only written when you get a an XML terminator "</{name}>". This would be just one transform stage and a stage variable.
If I could program in awk or sed I think it would be a 1-liner there as well. Or you could run it through one the of freely available XML reformat programs and have it do this for you.
If I could program in awk or sed I think it would be a 1-liner there as well. Or you could run it through one the of freely available XML reformat programs and have it do this for you.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your volume won't change (apart from a few line terminators) - you have exactly the same amount of XML in both formats.beaulie01 wrote:Ray,
So if I understand well, there is nothing I can do? It's because I want to reduce the volume of my XML output file.
Thanks! :D
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.