Class DefaultJAXBModelParser<T>
- java.lang.Object
-
- com.github.dozermapper.core.builder.xml.DefaultJAXBModelParser<T>
-
- Type Parameters:
T- type of jaxb model
- All Implemented Interfaces:
JAXBModelParser<T>
public class DefaultJAXBModelParser<T> extends Object implements JAXBModelParser<T>
Parses XML content to a jaxb model usingJAXBContext
-
-
Constructor Summary
Constructors Constructor Description DefaultJAXBModelParser(BeanContainer beanContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreadXML(String xmlContent, Class<T> type)Loads XML into memory and converts to a typevoidvalidateXML(String xmlContent)Validates xml content against resolved schema
-
-
-
Constructor Detail
-
DefaultJAXBModelParser
public DefaultJAXBModelParser(BeanContainer beanContainer)
-
-
Method Detail
-
validateXML
public void validateXML(String xmlContent) throws IOException, SAXException
Validates xml content against resolved schema- Specified by:
validateXMLin interfaceJAXBModelParser<T>- Parameters:
xmlContent- xml content to validate- Throws:
IOException- content related exceptionSAXException- validation related execption
-
readXML
public T readXML(String xmlContent, Class<T> type) throws SAXException
Loads XML into memory and converts to a type- Specified by:
readXMLin interfaceJAXBModelParser<T>- Parameters:
xmlContent- xml content to loadtype- type to convert xml to- Returns:
- parsed XML to type
- Throws:
SAXException- parsing related execption
-
-