javax.xml.bind
Interface Unmarshaller


public interface Unmarshaller

The Unmarshaller class governs the process of deserializing XML data into newly created Java content trees, optionally validating the XML data as it is unmarshalled.

Since:
18-Oct-2004
Author:
Thomas.Diesler@jboss.org

Method Summary
 ValidationEventHandler getEventHandler()
          Return the current event handler or the default event handler if one hasn't been set.
 Object getProperty(String name)
          Get the particular property in the underlying implementation of Unmarshaller.
 UnmarshallerHandler getUnmarshallerHandler()
          Get an unmarshaller handler object that can be used as a component in an XML pipeline.
 boolean isValidating()
          Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.
 void setEventHandler(ValidationEventHandler handler)
          Allow an application to register a ValidationEventHandler.
 void setProperty(String name, Object value)
          Set the particular property in the underlying implementation of Unmarshaller.
 void setValidating(boolean validating)
          Specifies whether or not the default validation mechanism of the Unmarshaller should validate during unmarshal operations.
 Object unmarshal(File file)
          Unmarshal XML data from the specified file and return the resulting content tree.
 Object unmarshal(InputSource source)
          Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.
 Object unmarshal(InputStream is)
          Unmarshal XML data from the specified InputStream and return the resulting content tree.
 Object unmarshal(Node node)
          Unmarshal XML data from the specified DOM tree and return the resulting content tree.
 Object unmarshal(Source source)
          Unmarshal XML data from the specified XML Source and return the resulting content tree.
 Object unmarshal(URL url)
          Unmarshal XML data from the specified URL and return the resulting content tree.
 

Method Detail

getEventHandler

ValidationEventHandler getEventHandler()
                                       throws JAXBException
Return the current event handler or the default event handler if one hasn't been set.

Throws:
JAXBException

getProperty

Object getProperty(String name)
                   throws PropertyException
Get the particular property in the underlying implementation of Unmarshaller.

Throws:
PropertyException

getUnmarshallerHandler

UnmarshallerHandler getUnmarshallerHandler()
Get an unmarshaller handler object that can be used as a component in an XML pipeline.


isValidating

boolean isValidating()
                     throws JAXBException
Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.

Throws:
JAXBException

setEventHandler

void setEventHandler(ValidationEventHandler handler)
                     throws JAXBException
Allow an application to register a ValidationEventHandler.

Throws:
JAXBException

setProperty

void setProperty(String name,
                 Object value)
                 throws PropertyException
Set the particular property in the underlying implementation of Unmarshaller.

Throws:
PropertyException

setValidating

void setValidating(boolean validating)
                   throws JAXBException
Specifies whether or not the default validation mechanism of the Unmarshaller should validate during unmarshal operations.

Throws:
JAXBException

unmarshal

Object unmarshal(File file)
                 throws JAXBException
Unmarshal XML data from the specified file and return the resulting content tree.

Throws:
JAXBException

unmarshal

Object unmarshal(InputSource source)
                 throws JAXBException
Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.

Throws:
JAXBException

unmarshal

Object unmarshal(InputStream is)
                 throws JAXBException
Unmarshal XML data from the specified InputStream and return the resulting content tree.

Throws:
JAXBException

unmarshal

Object unmarshal(Node node)
                 throws JAXBException
Unmarshal XML data from the specified DOM tree and return the resulting content tree.

Throws:
JAXBException

unmarshal

Object unmarshal(Source source)
                 throws JAXBException
Unmarshal XML data from the specified XML Source and return the resulting content tree.

Throws:
JAXBException

unmarshal

Object unmarshal(URL url)
                 throws JAXBException
Unmarshal XML data from the specified URL and return the resulting content tree.

Throws:
JAXBException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.