DATA REPORTING APPLICATION PROGRAMMING INTERFACES IN AN XML PARSER GENERATOR FOR XML VALIDATION AND DESERIALIZATION
A method for interfacing with an XML (Extensible Markup Language) parser generator to generate deserialization information interleaved with XML parsing and validation, including: providing an XML parser generator with information about the schema which the instance data conforms to; providing a data reporting application programming interface (API) and a generator module; providing one or more implementations of the data reporting API; providing the XML parser generator with a selected data reporting API implementation module; generating an XML parser to parse and validate instance documents conforming to the specified input schema and deserializing the instance documents into the desired deserialization format during the parse.
1 . A method for interfacing with an XML (Extensible Markup Language) parser generator to generate deserialization information interleaved with XML parsing and validation, the method comprising:
providing an XML parser generator with information about the schema which the instance data conforms to;
providing a data reporting application programming interface (API) and a generator module;
providing one or more implementations of the data reporting API;
providing the XML parser generator with a selected data reporting API implementation module;
generating an XML parser to parse and validate instance documents conforming to the specified input schema and deserializing the instance documents into the desired deserialization form during the parse.
2 . The method of claim 1 , wherein the data reporting API is used to generate code that creates appropriate data structures to store the instance data, assign values to the data structures, and allocate space.
3 . The method of claim 1 , wherein the data reporting API is used to generate code that creates an event stream representation of the instance data.
4 . The method of claim 1 , wherein two types of information is exchanged between the data reporting API and the XML parser generator.
5 . The method of claim 4 , wherein a first type of information describes a current context that the XML parser generator is currently generating code for.
6 . The method of claim 4 , wherein a second type of information involves how the instance data is referenced during runtime and how the XML parser generator refers to the referenced instance data for parsing and validation requirements.
7 . A computer program product for interfacing with an XML (Extensible Markup Language) parser generator to generate deserialization information interleaved with XML parsing and validation, the computer program product comprising:
a storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
providing an XML parser generator with information about the schema which the instance data conforms to;
providing a data reporting application programming interface (API) and a generator module;
providing one or more implementations of the data reporting API;
providing the XML parser generator with a selected data reporting API implementation module;
generating an XML parser to parse and validate instance documents conforming to the specified input schema and deserializing the instance documents into the desired deserialization form during the parse.
8 . The computer program product of claim 7 , wherein the data reporting API is used to generate code that creates appropriate data structures to store the instance data, assign values to the data structures, and allocate space.
9 . The computer program product of claim 7 , wherein the data reporting API is used to generate code that creates an event stream representation of the instance data.
10 . The computer program product of claim 7 , wherein two types of information is exchanged between the data reporting API and the XML parser generator.
11 . The computer program product of claim 10 , wherein a first type of information describes a current context that the XML parser generator is currently generating code for.
12 . The computer program product of claim 10 , wherein a second type of information involves how the instance data is referenced during runtime and how the XML parser generator refers to the referenced instance data for parsing and validation requirements.