public interface XMLMapper
| Modifier and Type | Interface and Description |
|---|---|
static class |
XMLMapper.Factory
A factory for creating an instance of
XMLMapper. |
<T> void registerRootElement(QName name, XMLElementReader<T> reader)
XMLExtendedStreamReader.handleAny(Object).name - the element namereader - the reader which handles the element<T> void registerRootElement(QName name, Supplier<XMLElementReader<T>> supplier)
XMLExtendedStreamReader.handleAny(Object).name - the element namesupplier - provider for the reader which handles the element
It is recommended that supplier always creates new instance of the XMLElementReader
instead of caching and returning always same instance. This way unused parsers can get GC-ed
when not needed.void unregisterRootElement(QName name)
previously registered root element.name - the element namevoid registerRootAttribute(QName name, XMLAttributeReader<?> reader)
XMLExtendedStreamReader.handleAttribute(Object, int).name - the attribute namereader - the reader which handles the attributevoid unregisterRootAttribute(QName name)
previously registered root attribute.name - the element namevoid parseDocument(Object rootObject, XMLStreamReader reader) throws XMLStreamException
rootObject - the root object to send inreader - the reader from which the document should be readXMLStreamException - if an error occursvoid deparseDocument(XMLElementWriter<?> writer, Object rootObject, XMLStreamWriter streamWriter) throws XMLStreamException
writer - the element writerrootObject - the root object to send instreamWriter - the stream writerXMLStreamException - if an exception occurs@Deprecated void deparseDocument(XMLContentWriter contentWriter, XMLStreamWriter streamWriter) throws XMLStreamException
contentWriter - the content writerstreamWriter - the stream writerXMLStreamException - if an exception occursCopyright © 2016 JBoss by Red Hat. All rights reserved.