The HL7v2 standard defines a set of message types, each with a specific structure. The structure of each message therefore follows an underlying model or schema (a formal description). When available in a structured format, these schemas can be used to validate the messages, generate code for parsing and serializing the messages, and perform other kinds of automated processing.
The most "native" way to represent the HL7v2 message structure is by using the HL7 Abstract Message Syntax. This special notation is used in the normative HL7v2 documents and looks like this (example for the ACK^A01^ACK message type):
In addition to the textual descriptions of the message types, HL7 provides a set of XML Schemas, which are suitable for automated processing. These XML Schemas can be downloaded from the HL7 website.
The XML Schemas provided by HL7 are themselves based on the HL7 Database (HL7-DB), a structured representation of the HL7v2 specification. You can read more about the HL7 Database on Frank Oemig's website.
There are also a number of other sources of the HL7v2 message schemas, including: