Techniques for binding a data exchange format with a computer program
application having source code in a particular language include receiving
comment data from a particular file that includes the source code. The
comment data includes first data indicating a parameter of the data
exchange format. Second data from the particular file is also received.
The second data is associated with the comment data and includes a
statement that defines a class of data objects in the particular
language. Based on the first data and the second data, third data for
configuring the data exchange format is generated. When the particular
language is Java and the data exchange format is XML, these techniques
allow a developer to automatically produce an XML grammar document that
is based on Java data objects defined by the developer and that is
responsive to the developer's choices for options in the XML grammar.
Individual classes or multiple nested classes are handled.