Welcome Guest ( Log In | Register )


 
Reply to this topicNew Topic
Flat file to XML convertion
JelleD
post Jul 29 2010, 10:58 AM
Post #1


Visitor
*

Group: Members
Posts: 2
Joined: 27-July 10
Member No.: 1,456


Hi,

I have a problem converting a flat file to xml.
The structure of the flat file is a header and a datapart.
The header contains the summation of the data and a start/end date.

So there are two possibilities:
- We receive the header and the data in two separate files (how to identify each data file with his header? how to put the two different files into one xml?)
- The header can be in the same flat file where the data is (but how do we define that the first line has a different structure than the lines that follow?)


Go to the top of the page
 
+Quote Post
franck
post Jul 29 2010, 07:26 PM
Post #2


Visitor
*

Group: Members
Posts: 1
Joined: 4-July 10
Member No.: 1,410


QUOTE (JelleD @ Jul 29 2010, 11:58 AM) *
Hi,

I have a problem converting a flat file to xml.
The structure of the flat file is a header and a datapart.
The header contains the summation of the data and a start/end date.

So there are two possibilities:
- We receive the header and the data in two separate files (how to identify each data file with his header? how to put the two different files into one xml?)
- The header can be in the same flat file where the data is (but how do we define that the first line has a different structure than the lines that follow?)


hi

is your files csv type ?
if it's the case , i made a generic csv to xml pgm
may be it can help you
you can change it to use the first reccord ( header ) as column id . it actually consider that each line is a reccord .

franck

i joined an example of a dtd also

Attached File(s)
Attached File  csv_to_xml.txt ( 16.31K ) Number of downloads: 3
Attached File  dtd_csv_toxml.txt ( 314bytes ) Number of downloads: 2
 
Go to the top of the page
 
+Quote Post
JelleD
post Jul 30 2010, 02:18 PM
Post #3


Visitor
*

Group: Members
Posts: 2
Joined: 27-July 10
Member No.: 1,456


Nice thanks allot. I will look into it.

I've also tried working with landmarks in the Inhouse Business document.
i made sure each line starts with a specific index like '0' means it is a header line
'1' means it is a data line.
But now my broadcast to integrator has an exeption. smile.gif

So will need to re-do it
But i will check out your solution that one could work like a charm biggrin.gif
thanks mate! smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Skin designed by IPB Forum Skins