public class GrammarParser extends AbstractStaxParser<GrammarComponentParser>
Main parser class for parsing a gml file, this is file (also known as a grammar file) that defines the structure of an Edi message and contains validation details on the data that the message conveys.
This class parses the gxml file and converts it into an object graph representation. This can then be used to process Edi data in a number of ways.
StaX (Streaming api for XML) is the approach used to process the XML. This is a modern and developer friendly alternative to SAX, and is a pull based parsing method as opposed to a push based one like SAX.
Since the xml contains a number repeated elements, dedicated parsing routines have been created made to parse each one. These are located in the Map <String - element tag name, GrammarElementParser - specific element parser> called: parserDelegates. The names of the xml elements are declared in a object: XMLTagnames. This allows the the developer to easy customise the xml element names used for parsing and writing xml. It potentially could even be used to control the xml structure also.