Interface IXmlParsingContext
- All Superinterfaces:
IParsingContext<org.codehaus.stax2.XMLEventReader2,
IXmlProblemHandler>
- All Known Implementing Classes:
MetaschemaXmlReader
public interface IXmlParsingContext
extends IParsingContext<org.codehaus.stax2.XMLEventReader2,IXmlProblemHandler>
-
Method Summary
Modifier and TypeMethodDescription<CLASS> CLASS
read
(IBoundDefinitionModelComplex definition) Parses XML into a bound object based on the provideddefinition
.<T> boolean
readItems
(IBoundInstanceModel<T> instance, IBoundObject parentObject, boolean parseGrouping) Read the data associated with theinstance
and apply it to the providedparentObject
.Methods inherited from interface gov.nist.secauto.metaschema.databind.io.IParsingContext
getProblemHandler, getReader
-
Method Details
-
read
Parses XML into a bound object based on the provideddefinition
.Parses the
XMLStreamConstants.START_DOCUMENT
, any processing instructions, and the element.- Type Parameters:
CLASS
- the returned object type- Parameters:
definition
- the definition describing the element data to read- Returns:
- the parsed object
- Throws:
IOException
- if an error occurred while parsing the input
-
readItems
<T> boolean readItems(@NonNull IBoundInstanceModel<T> instance, @NonNull IBoundObject parentObject, boolean parseGrouping) throws IOException Read the data associated with theinstance
and apply it to the providedparentObject
.- Type Parameters:
T
- the item Java type- Parameters:
instance
- the instance to parse data forparentObject
- the Java object that data parsed by this method will be stored inparseGrouping
- iftrue
parse the instance's grouping element orfalse
otherwise- Returns:
true
if the instance was parsed, orfalse
if the data did not contain information for this instance- Throws:
IOException
- if an error occurred while parsing the input
-