Class XMLUnmarshaller

java.lang.Object
org.eclipse.persistence.internal.oxm.Unmarshaller<ABSTRACT_SESSION,CONTEXT,DESCRIPTOR,ID_RESOLVER,MEDIA_TYPE,ROOT,UNMARSHALLER_HANDLER,UNMARSHALLER_LISTENER>
org.eclipse.persistence.internal.oxm.XMLUnmarshaller<org.eclipse.persistence.internal.sessions.AbstractSession,XMLContext,XMLDescriptor,IDResolver,MediaType,XMLRoot,XMLUnmarshallerHandler,XMLUnmarshalListener>
org.eclipse.persistence.oxm.XMLUnmarshaller
All Implemented Interfaces:
Cloneable

public class XMLUnmarshaller extends org.eclipse.persistence.internal.oxm.XMLUnmarshaller<org.eclipse.persistence.internal.sessions.AbstractSession,XMLContext,XMLDescriptor,IDResolver,MediaType,XMLRoot,XMLUnmarshallerHandler,XMLUnmarshalListener> implements Cloneable

Class used to unmarshal XML & JSON to objects.

Create an XMLUnmarshaller from an XMLContext.
Code Sample
XMLContext context = new XMLContext("mySessionName");
XMLUnmarshaller unmarshaller = context.createUnmarshaller();

XML can be unmarshalled from the following inputs:

  • java.io.File
  • java.io.InputStream
  • java.io.Reader
  • java.net.URL
  • javax.xml.transform.Source
  • org.w3c.dom.Node
  • org.xml.sax.InputSource

XML that can be unmarshalled is XML which has a root tag that corresponds to a default root element on an XMLDescriptor in the TopLink project associated with the XMLContext.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.persistence.internal.oxm.Unmarshaller

    org.eclipse.persistence.internal.oxm.Unmarshaller.Listener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class org.eclipse.persistence.internal.oxm.XMLUnmarshaller

    platformUnmarshaller, schemasAreInitialized, xmlUnmarshallerHandler

    Fields inherited from class org.eclipse.persistence.internal.oxm.Unmarshaller

    context
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    XMLUnmarshaller(XMLContext xmlContext, Map<String,Boolean> parserFeatures)
     
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    INTERNAL
    org.eclipse.persistence.internal.oxm.record.UnmarshalRecord
    createUnmarshalRecord(XMLDescriptor xmlDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
    INTERNAL
    Return this Unmarshaller's custom IDResolver.
    Get the MediaType for this xmlUnmarshaller.
     
     
    Return the instance of XMLContext that was used to create this instance of XMLUnmarshaller.
    protected void
    initialize(Map<String,Boolean> parserFeatures)
     
    void
    Set this Unmarshaller's custom IDResolver.
    void
    Set the MediaType for this xmlUnmarshaller.
    void
     
    void
    setValidationMode(int validationMode)
    Set the validation mode.
    void
    Set the XMLContext used by this instance of XMLUnmarshaller.

    Methods inherited from class org.eclipse.persistence.internal.oxm.XMLUnmarshaller

    createRootUnmarshalRecord, getAttachmentUnmarshaller, getAttributePrefix, getEntityResolver, getErrorHandler, getJsonTypeConfiguration, getNamespaceResolver, getNamespaceSeparator, getProperties, getProperty, getSchema, getStringBuffer, getUnmappedContentHandlerClass, getUnmarshalAttributeGroup, getValidationMode, getValueWrapper, isApplicationJSON, isApplicationXML, isAutoDetectMediaType, isCaseInsensitive, isIncludeRoot, isLogPayload, isResultAlwaysXMLRoot, isSecureProcessingDisabled, isWrapperAsCollectionName, setAttachmentUnmarshaller, setAttributePrefix, setAutoDetectMediaType, setCaseInsensitive, setDisableSecureProcessing, setEntityResolver, setErrorHandler, setIncludeRoot, setLogPayload, setNamespaceResolver, setNamespaceSeparator, setResultAlwaysXMLRoot, setSchema, setUnmappedContentHandlerClass, setUnmarshalAttributeGroup, setValueWrapper, setWarnOnUnmappedElement, setWrapperAsCollectionName, shouldWarnOnUnmappedElement, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal

    Methods inherited from class org.eclipse.persistence.internal.oxm.Unmarshaller

    getContext

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait