Class XMLUnmarshaller

  • All Implemented Interfaces:
    Cloneable

    public class XMLUnmarshaller
    extends XMLUnmarshaller<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:
    XMLContext