![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a legacy system that outputs a billing file where each data element has a specific length. The billing file has multiple information 1. Customer billing information 2. Customer shipping information 3. Order information (#, date, totals etc...) 4. Order line items (item#, qty, unit price, line total) Up until item 3 - it is fixed length. Since an order can have one or more line items the overall length of the record will vary. The order line itself will be fixed size that may repeat itself I need help in figuring out how to transform this into XML. I have come across examples of flat file to xml conversions where the entire record is fixed length. |
#3
| |||
| |||
|
|
Shikari Shambu wrote: I have a legacy system that outputs a billing file where each data element has a specific length. The billing file has multiple information 1. Customer billing information 2. Customer shipping information 3. Order information (#, date, totals etc...) 4. Order line items (item#, qty, unit price, line total) Up until item 3 - it is fixed length. Since an order can have one or more line items the overall length of the record will vary. The order line itself will be fixed size that may repeat itself I need help in figuring out how to transform this into XML. I have come across examples of flat file to xml conversions where the entire record is fixed length. With the .NET framework using regular expression matching might help to identify items in that flat file. To create XML you can use XmlWriter or XmlDocument or (in .NET 3.5) LINQ to XML. -- Martin Honnen --- MVP XML http://msmvps.com/blogs/martin_honnen/ |
#4
| |||
| |||
|
|
Thanks for the input. I guess I forgot to mention that the attributes are position based I.e. first 20 chars= customer first name 21st= middle initial 22-42= last name etc... I am not sure if RegEx can help here. If you have examples I would look to take a look. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |