Debugging, Decompiling or Round-Tripping the Target Language

I am sure this is worthy of an RTFM, but given the sheer weight of documentation for a newbie, I will risk the flames. In fact, whatever else I might get, one thing that might help me is a list of chapters and/or links in the ANTLR documentation, that would lead me reasonably efficiently towards my goal.

My goal:

I am interested in understanding in an orderly, principled way (if such is possible), the manner in which one might build a 'config-file'-driven translation of data into code, that can also be used to de-compile the very same code or "properly" edited code, back into the data that generated it or would have generated it in the first place.

Specifically, I want to translate an XML document into an editor and editing structures, that allow some 'valid' set of actions, that translate back into the XML that could have generated in in the first place. But I am less interested in tips and techniques for how to accomplish my goal than in the principles to guide thinking about the problem. To some extent, that is because I recognize (admit defeat?) the open-ended nature of the problem. Or should I?

Thanks,

Nick