Ladies and Gents, I need some guidance and a sample snippet if possible.
Basically I want to convert an xml file to a fixed length text file.
The following is a sample of what I am trying to do.
Note the data for each element/attribute must be in the exact start
position stated below. For example, if there is a scenario where child2
does not show on the input xml file, then if child3 is present, it must
still start in position 39.
Position of data for output file:
field: child1 start 1 length 7
field: att1 start 12 length 5
field: child2 start 27 length 12
field: child3 start 39 length 15
field: att2 start 56 length 3
Input:
<parent att1="foo">
<child1>aChild</child1>
<child2>anotherChild</child2>
<child3 att2="bar">yetAnotherChild</child3>
</parent>
Output:
aChild foo anotherChildyetAnotherChild bar
I would really appreciate any help on this.
Thanks
Garvin Franco
garvin_franco@hotmail.com
-
Converting XML to Fixed Length Text Data using XSLT (2 messages)
- Posted by: garvin franco
- Posted on: March 27 2002 01:20 EST
Threaded Messages (2)
- Converting XML to Fixed Length Text Data using XSLT by Abhijit Gaikwad on March 28 2002 09:12 EST
- Converting XML to Fixed Length Text Data using XSLT by garvin franco on March 28 2002 12:29 EST
-
Converting XML to Fixed Length Text Data using XSLT[ Go to top ]
- Posted by: Abhijit Gaikwad
- Posted on: March 28 2002 09:12 EST
- in response to garvin franco
Hi Garvin Franco ,
Have heard about weblogic integrator. This product is for MOM. In this product , 'FormatBuilder' is the module.
Which does follwoing type of conversions .
i.e. From 'Binary stream' to 'XML' and 'XML' to 'Binary'.
you can configure amny ways using thro Swing UI they have provided .
Output of this tool , are java files . you can use those java files directly .
Freeware is available on net visit www.bea.com
Regards,
Abhijit
-
Converting XML to Fixed Length Text Data using XSLT[ Go to top ]
- Posted by: garvin franco
- Posted on: March 28 2002 12:29 EST
- in response to Abhijit Gaikwad
Hi Abhijit,
I was looking for an open solution to experiment with. I am using the Xalan processor and I am looking for an example of a stylesheet that would give me the output specified in my original message. Do you have any clues?
Garvin