I was asked how you would parser a x12 837 (medical claims). It was the first time I have see a file format like it. A little time on Google and I learned that the file contains 3 types of delimiters at 103,104,105 and that the first element in the file is fixed length.
Next I learned the elements I parsed out, are ordered in a XML like way, but with no closing tags. This site http://pyx12.sourceforge.net/doc/maps/ has a explanation of the order of the elements. I also found a PDF file that go into 750 pages of details about the format of the file.
At this point I realize that it's not a simple task to put this information into a database. I eventually get the idea to covert the x12 file into XML, and use xpath as a query tool to get the information out of the file. That works great I can get all the claims, line items, and the people attached to the claim.
My company wrote it's own medical claims system. Now, I'm trying to understand how to make a 835 Claim Payment response to a 837, with our system in the middle.
I'm a noob here so be kind. :)
Update
My code can now parse/validate x12 files based on a grammar from a few XML files. Take an existing x12 file covert it into XML then back to x12. I also wrote a few classes to make an x12 in XML form. It uses xPath to find elements, and if not found create the missing elements. I got the idea from here. http://stackoverflow.com/questions/508390/create-xml-nodes-based-on-xpath