Package | Description |
---|---|
javax.xml.bind |
Provides a runtime binding framework for client applications including
unmarshalling, marshalling, and validation capabilities.
|
javax.xml.bind.helpers |
JAXB Provider Use Only: Provides partial default implementations for
some of the javax.xml.bind interfaces.
|
javax.xml.bind.util |
Useful client utility classes.
|
Modifier and Type | Class and Description |
---|---|
class |
MarshalException
This exception indicates that an error has occurred while performing
a marshal operation that the provider is unable to recover from.
|
class |
PropertyException
This exception indicates that an error was encountered while getting or
setting a property.
|
class |
UnmarshalException
This exception indicates that an error has occurred while performing
an unmarshal operation that prevents the JAXB Provider from completing
the operation.
|
class |
ValidationException
This exception indicates that an error has occurred while performing
a validate operation.
|
Modifier and Type | Method and Description |
---|---|
abstract Marshaller |
JAXBContext.createMarshaller()
Create a Marshaller object that can be used to convert a
java content tree into XML data.
|
abstract Unmarshaller |
JAXBContext.createUnmarshaller()
Create an Unmarshaller object that can be used to convert XML
data into a java content tree.
|
abstract Validator |
JAXBContext.createValidator()
Deprecated.
since JAXB2.0
|
abstract ValidationEventHandler |
Binder.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
ValidationEventHandler |
Validator.getEventHandler()
Deprecated.
since JAXB2.0
|
ValidationEventHandler |
Marshaller.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
ValidationEventHandler |
Unmarshaller.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
Node |
Marshaller.getNode(Object contentTree)
Get a DOM tree view of the content tree(Optional).
|
Object |
UnmarshallerHandler.getResult()
Obtains the unmarshalled result.
|
boolean |
Unmarshaller.isValidating()
Deprecated.
since JAXB2.0, please see
Unmarshaller.getSchema() |
void |
Marshaller.marshal(Object jaxbElement,
ContentHandler handler)
Marshal the content tree rooted at jaxbElement into SAX2 events.
|
void |
Marshaller.marshal(Object jaxbElement,
File output)
Marshal the content tree rooted at jaxbElement into a file.
|
void |
Marshaller.marshal(Object jaxbElement,
Node node)
Marshal the content tree rooted at jaxbElement into a DOM tree.
|
void |
Marshaller.marshal(Object jaxbElement,
OutputStream os)
Marshal the content tree rooted at jaxbElement into an output stream.
|
void |
Marshaller.marshal(Object jaxbElement,
Result result)
Marshal the content tree rooted at jaxbElement into the specified
javax.xml.transform.Result.
|
void |
Marshaller.marshal(Object jaxbElement,
Writer writer)
Marshal the content tree rooted at jaxbElement into a Writer.
|
void |
Marshaller.marshal(Object jaxbElement,
XMLEventWriter writer)
Marshal the content tree rooted at jaxbElement into a
XMLEventWriter . |
abstract void |
Binder.marshal(Object jaxbObject,
XmlNode xmlNode)
Marshal a JAXB object tree to a new XML document.
|
void |
Marshaller.marshal(Object jaxbElement,
XMLStreamWriter writer)
Marshal the content tree rooted at jaxbElement into a
XMLStreamWriter . |
static JAXBContext |
JAXBContext.newInstance(Class... classesToBeBound)
Obtain a new instance of a JAXBContext class.
|
static JAXBContext |
JAXBContext.newInstance(Class[] classesToBeBound,
Map<String,?> properties)
Obtain a new instance of a JAXBContext class.
|
static JAXBContext |
JAXBContext.newInstance(String contextPath)
Obtain a new instance of a JAXBContext class.
|
static JAXBContext |
JAXBContext.newInstance(String contextPath,
ClassLoader classLoader)
Obtain a new instance of a JAXBContext class.
|
static JAXBContext |
JAXBContext.newInstance(String contextPath,
ClassLoader classLoader,
Map<String,?> properties)
Obtain a new instance of a JAXBContext class.
|
abstract void |
Binder.setEventHandler(ValidationEventHandler handler)
Allow an application to register a ValidationEventHandler.
|
void |
Validator.setEventHandler(ValidationEventHandler handler)
Deprecated.
since JAXB2.0
|
void |
Marshaller.setEventHandler(ValidationEventHandler handler)
Allow an application to register a validation event handler.
|
void |
Unmarshaller.setEventHandler(ValidationEventHandler handler)
Allow an application to register a ValidationEventHandler.
|
void |
Unmarshaller.setValidating(boolean validating)
Deprecated.
since JAXB2.0, please see
Unmarshaller.setSchema(javax.xml.validation.Schema) |
Object |
Unmarshaller.unmarshal(File f)
Unmarshal XML data from the specified file and return the resulting
content tree.
|
Object |
Unmarshaller.unmarshal(InputSource source)
Unmarshal XML data from the specified SAX InputSource and return the
resulting content tree.
|
Object |
Unmarshaller.unmarshal(InputStream is)
Unmarshal XML data from the specified InputStream and return the
resulting content tree.
|
Object |
Unmarshaller.unmarshal(Node node)
Unmarshal global XML data from the specified DOM tree and return the resulting
content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(Node node,
Class<T> declaredType)
Unmarshal XML data by JAXB mapped declaredType
and return the resulting content tree.
|
Object |
Unmarshaller.unmarshal(Reader reader)
Unmarshal XML data from the specified Reader and return the
resulting content tree.
|
Object |
Unmarshaller.unmarshal(Source source)
Unmarshal XML data from the specified XML Source and return the
resulting content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(Source source,
Class<T> declaredType)
Unmarshal XML data from the specified XML Source by declaredType and return the
resulting content tree.
|
Object |
Unmarshaller.unmarshal(URL url)
Unmarshal XML data from the specified URL and return the resulting
content tree.
|
Object |
Unmarshaller.unmarshal(XMLEventReader reader)
Unmarshal XML data from the specified pull parser and return the
resulting content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(XMLEventReader reader,
Class<T> declaredType)
Unmarshal root element to JAXB mapped declaredType
and return the resulting content tree.
|
abstract Object |
Binder.unmarshal(XmlNode xmlNode)
Unmarshal XML infoset view to a JAXB object tree.
|
abstract <T> JAXBElement<T> |
Binder.unmarshal(XmlNode xmlNode,
Class<T> declaredType)
Unmarshal XML root element by provided declaredType
to a JAXB object tree.
|
Object |
Unmarshaller.unmarshal(XMLStreamReader reader)
Unmarshal XML data from the specified pull parser and return the
resulting content tree.
|
<T> JAXBElement<T> |
Unmarshaller.unmarshal(XMLStreamReader reader,
Class<T> declaredType)
Unmarshal root element to JAXB mapped declaredType
and return the resulting content tree.
|
abstract Object |
Binder.updateJAXB(XmlNode xmlNode)
Takes an XML node and updates its associated JAXB object and its descendants.
|
abstract XmlNode |
Binder.updateXML(Object jaxbObject)
Takes an JAXB object and updates
its associated XML node and its descendants.
|
abstract XmlNode |
Binder.updateXML(Object jaxbObject,
XmlNode xmlNode)
Changes in JAXB object tree are updated in its associated XML parse tree.
|
boolean |
Validator.validate(Object subrootObj)
Deprecated.
since JAXB2.0
|
boolean |
Validator.validateRoot(Object rootObj)
Deprecated.
since JAXB2.0
|
Modifier and Type | Method and Description |
---|---|
ValidationEventHandler |
AbstractUnmarshallerImpl.getEventHandler()
Return the current event handler or the default event handler if one
hasn't been set.
|
ValidationEventHandler |
AbstractMarshallerImpl.getEventHandler() |
Node |
AbstractMarshallerImpl.getNode(Object obj)
By default, the getNode method is unsupported and throw
an
UnsupportedOperationException . |
protected XMLReader |
AbstractUnmarshallerImpl.getXMLReader()
Obtains a configured XMLReader.
|
boolean |
AbstractUnmarshallerImpl.isValidating()
Indicates whether or not the Unmarshaller is configured to validate
during unmarshal operations.
|
void |
AbstractMarshallerImpl.marshal(Object obj,
ContentHandler handler) |
void |
AbstractMarshallerImpl.marshal(Object jaxbElement,
File output) |
void |
AbstractMarshallerImpl.marshal(Object obj,
Node node) |
void |
AbstractMarshallerImpl.marshal(Object obj,
OutputStream os) |
void |
AbstractMarshallerImpl.marshal(Object obj,
Writer w) |
void |
AbstractMarshallerImpl.marshal(Object obj,
XMLEventWriter writer) |
void |
AbstractMarshallerImpl.marshal(Object obj,
XMLStreamWriter writer) |
void |
AbstractUnmarshallerImpl.setEventHandler(ValidationEventHandler handler)
Allow an application to register a validation event handler.
|
void |
AbstractMarshallerImpl.setEventHandler(ValidationEventHandler handler) |
void |
AbstractUnmarshallerImpl.setValidating(boolean validating)
Specifies whether or not the Unmarshaller should validate during
unmarshal operations.
|
Object |
AbstractUnmarshallerImpl.unmarshal(File f) |
Object |
AbstractUnmarshallerImpl.unmarshal(InputSource source) |
Object |
AbstractUnmarshallerImpl.unmarshal(InputStream is) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(Node node,
Class<T> expectedType) |
Object |
AbstractUnmarshallerImpl.unmarshal(Reader reader) |
Object |
AbstractUnmarshallerImpl.unmarshal(Source source) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(Source source,
Class<T> expectedType) |
Object |
AbstractUnmarshallerImpl.unmarshal(URL url) |
Object |
AbstractUnmarshallerImpl.unmarshal(XMLEventReader reader) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(XMLEventReader reader,
Class<T> expectedType) |
protected abstract Object |
AbstractUnmarshallerImpl.unmarshal(XMLReader reader,
InputSource source)
Unmarshals an object by using the specified XMLReader and the InputSource.
|
Object |
AbstractUnmarshallerImpl.unmarshal(XMLStreamReader reader) |
<T> JAXBElement<T> |
AbstractUnmarshallerImpl.unmarshal(XMLStreamReader reader,
Class<T> expectedType) |
Modifier and Type | Method and Description |
---|---|
Object |
JAXBResult.getResult()
Gets the unmarshalled object created by the transformation.
|
Constructor and Description |
---|
JAXBResult(JAXBContext context)
Creates a new instance that uses the specified
JAXBContext to unmarshal.
|
JAXBResult(Unmarshaller _unmarshaller)
Creates a new instance that uses the specified
Unmarshaller to unmarshal an object.
|
JAXBSource(JAXBContext context,
Object contentObject)
Creates a new
Source for the given content object. |
JAXBSource(Marshaller marshaller,
Object contentObject)
Creates a new
Source for the given content object. |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2024, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.