Skip to content

Binding

Albert Martínez edited this page Feb 25, 2019 · 1 revision

XML Marshaling and Unmarshaling jaxb and jibx objects

JAXB

Marshal

Instance object

JaxbMarshal(Object object, Class<?> classType);

Methods

marshaller(OutputStream stream);
marshaller(OutputStream stream, Charset charset, boolean formatted, boolean fragment);
marshaller(Writer writer);
marshaller(Node node);

Unmarshal

Instance object

JaxbUnmarshal(File file, Class[] classType)
JaxbUnmarshal(InputStream inputStream, Class[] classType)
JaxbUnmarshal(URL url, Class[] classType)
JaxbUnmarshal(StringBuffer stringbuffer, Class[] classType)
JaxbUnmarshal(Node node, Class<?> classType)
JaxbUnmarshal(SAXSource saxSource, Class[] classType)
JaxbUnmarshal(XMLStreamReader xmlStreamReader, Class[] classType)
JaxbUnmarshal(XMLEventReader xmlEventReader, Class[] classType)

Methods

getObject()     // return data unmarshalling
isValidating()  // return boolean. Validate schema

JIBX

Marshal

marshall(Object root, Class<?> classType)
marshall(Object root, String enc, Boolean alone, Class<?> classType)
marshall(Object root, String enc, Boolean alone, OutputStream outs, Class<?> classType)
marshall(Object root, String enc, Boolean alone, Writer outw, Class<?> classType)

Unmarshal

JibxUnMarshall(InputStream ins, Charset enc, Class<?> classType)
JibxUnMarshall(InputStream ins, String name, Charset enc, Class<?> classType)
JibxUnMarshall(Reader rdr, Class<?> classType)
JibxUnMarshall(Reader rdr, String name, Class<?> classType)

Options

getElement() // return element unmarshalling
Clone this wiki locally