I've read XML or CSV before, but I've never seen anything like EDI.
How do I read this file and get the data that I need? I see things like ~, REF, N1, N2, N4 but have no idea what any of this stuff means.
I've seen somethings about x12 but don't know if that's what I have or not, how can I tell?
EDI messages are defined by the X12 standard.
If you look for X12 parsers, you can find helpful information.
For example, http://code.activestate.com/recipes/299485/