I have a .txt file as attached below. What i am trying to do here is to convert this CSV file into a deep structure XML. The example .txt file (Input.txt) which is attached has 4 records (Header (H), ITEM (I), ItemDetail(ID), Address (A) ), these 4 records repeat in the same sequence and there can be repeating Recordsets (H,I,ID,A) and a Trailer at the end.
The object here is to convert the .txt to a deep structure and i am doing this using 2 different steps, the first stage is to convert the CSV to an XML using SAP PI integration tool with its feature of File content Conversion (FCC), Now i need to apply the java mapping (also attached below) to convert this XML to a deep structure.
My issue here is i haven't written this code and got it from SAP forums, i would like to test this code to create the Deep structure (also attached is the deep structure snapshot). All i would need is to have a main method to debug this code and i am having trouble writing the main method to execute this class.
Note: I am not able to attach the library files that need to execute this code as the attachments don't allow all formats. If any one can suggest any way to upload them i can do it or i can send them to their email.
I am attaching the following,
-Text file (Input.txt)
-XML file after SAP PI FCC (MainDocument.xml)
-Code for the class to convert the MainDocument.xml to a Deep structure (SAX_File Parsing.doc)
-Deep structure snapshot (OutXML.jpg)