Since you want to generate the 270, you don't want to use a "parser". The Parser tool might work for the inbound 271 response. To write your own translator (generator), you should get an implementation guide from your trading partner. An example of the 270 can be found here: CMS 270. That should give you a good idea of how to create the segments and elements needed to transmit the document. EDI is text based on a standard. The implementation guide should give you a fairly good representation of the partner's usage of that standard.
Obviously, commercial software would allow you to model your source data (database, XML, etc) and your target and allow you to drag / drop easier than writing your own mapping for some of these complex HIPAA documents. The open source parsers generally only "translate" to a generic XML file giving you less control over the workflow, and generally introducing another step (usually middleware or XLST).