Class XMLUnmarshaller

  • All Implemented Interfaces:
    java.lang.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 java.lang.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:
    XMLContext
    • 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 int DTD_VALIDATION  
      static int NONVALIDATING  
      static int SCHEMA_VALIDATION  
      • Fields inherited from class org.eclipse.persistence.internal.oxm.XMLUnmarshaller

        platformUnmarshaller, schemasAreInitialized, xmlUnmarshallerHandler
      • Fields inherited from class org.eclipse.persistence.internal.oxm.Unmarshaller

        context
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      XMLUnmarshaller clone()  
      XMLRoot createRoot()
      INTERNAL
      org.eclipse.persistence.internal.oxm.record.UnmarshalRecord createUnmarshalRecord​(XMLDescriptor xmlDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
      INTERNAL
      IDResolver getIDResolver()
      Return this Unmarshaller's custom IDResolver.
      MediaType getMediaType()
      Get the MediaType for this xmlUnmarshaller.
      XMLUnmarshallerHandler getUnmarshallerHandler()  
      XMLUnmarshalListener getUnmarshalListener()  
      XMLContext getXMLContext()
      Return the instance of XMLContext that was used to create this instance of XMLUnmarshaller.
      protected void initialize​(java.util.Map<java.lang.String,​java.lang.Boolean> parserFeatures)  
      void setIDResolver​(IDResolver idResolver)
      Set this Unmarshaller's custom IDResolver.
      void setMediaType​(MediaType mediaType)
      Set the MediaType for this xmlUnmarshaller.
      void setUnmarshalListener​(XMLUnmarshalListener listener)  
      void setValidationMode​(int validationMode)
      Set the validation mode.
      void setXMLContext​(XMLContext value)
      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