< prev index next >
src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java
Print this page
*** 184,200 ****
* <b>Unmarshalling XML Data</b><br>
* <blockquote>
* Unmarshalling can deserialize XML data that represents either an entire XML document
* or a subtree of an XML document. Typically, it is sufficient to use the
* unmarshalling methods described by
! * <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal root element that is declared globally</a>.
* These unmarshal methods utilize {@link JAXBContext}'s mapping of global XML element
* declarations and type definitions to JAXB mapped classes to initiate the
* unmarshalling of the root element of XML data. When the {@link JAXBContext}'s
* mappings are not sufficient to unmarshal the root element of XML data,
* the application can assist the unmarshalling process by using the
! * <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">unmarshal by declaredType methods</a>.
* These methods are useful for unmarshalling XML data where
* the root element corresponds to a local element declaration in the schema.
* </blockquote>
*
* <blockquote>
--- 184,200 ----
* <b>Unmarshalling XML Data</b><br>
* <blockquote>
* Unmarshalling can deserialize XML data that represents either an entire XML document
* or a subtree of an XML document. Typically, it is sufficient to use the
* unmarshalling methods described by
! * <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal root element that is declared globally</a>.
* These unmarshal methods utilize {@link JAXBContext}'s mapping of global XML element
* declarations and type definitions to JAXB mapped classes to initiate the
* unmarshalling of the root element of XML data. When the {@link JAXBContext}'s
* mappings are not sufficient to unmarshal the root element of XML data,
* the application can assist the unmarshalling process by using the
! * <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">unmarshal by declaredType methods</a>.
* These methods are useful for unmarshalling XML data where
* the root element corresponds to a local element declaration in the schema.
* </blockquote>
*
* <blockquote>
*** 274,284 ****
* </table>
* </blockquote>
*
* <p>
* The following is an example of
! * <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">unmarshal by declaredType method</a>.
* <p>
* Unmarshal by declaredType from a {@code org.w3c.dom.Node}:
* <blockquote>
* <pre>{@code
* Schema fragment for example
--- 274,284 ----
* </table>
* </blockquote>
*
* <p>
* The following is an example of
! * <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">unmarshal by declaredType method</a>.
* <p>
* Unmarshal by declaredType from a {@code org.w3c.dom.Node}:
* <blockquote>
* <pre>{@code
* Schema fragment for example
*** 420,430 ****
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the file parameter is null
*/
public Object unmarshal( java.io.File f ) throws JAXBException;
--- 420,430 ----
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the file parameter is null
*/
public Object unmarshal( java.io.File f ) throws JAXBException;
*** 432,453 ****
* Unmarshal XML data from the specified InputStream and return the
* resulting content tree. Validation event location information may
* be incomplete when using this form of the unmarshal API.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param is the InputStream to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the InputStream parameter is null
*/
public Object unmarshal( java.io.InputStream is ) throws JAXBException;
--- 432,453 ----
* Unmarshal XML data from the specified InputStream and return the
* resulting content tree. Validation event location information may
* be incomplete when using this form of the unmarshal API.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param is the InputStream to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the InputStream parameter is null
*/
public Object unmarshal( java.io.InputStream is ) throws JAXBException;
*** 456,477 ****
* resulting content tree. Validation event location information may
* be incomplete when using this form of the unmarshal API,
* because a Reader does not provide the system ID.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param reader the Reader to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the InputStream parameter is null
* @since 1.6, JAXB 2.0
*/
public Object unmarshal( Reader reader ) throws JAXBException;
--- 456,477 ----
* resulting content tree. Validation event location information may
* be incomplete when using this form of the unmarshal API,
* because a Reader does not provide the system ID.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param reader the Reader to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the InputStream parameter is null
* @since 1.6, JAXB 2.0
*/
public Object unmarshal( Reader reader ) throws JAXBException;
*** 479,533 ****
/**
* Unmarshal XML data from the specified URL and return the resulting
* content tree.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param url the url to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the URL parameter is null
*/
public Object unmarshal( java.net.URL url ) throws JAXBException;
/**
* Unmarshal XML data from the specified SAX InputSource and return the
* resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param source the input source to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the InputSource parameter is null
*/
public Object unmarshal( org.xml.sax.InputSource source ) throws JAXBException;
/**
* Unmarshal global XML data from the specified DOM tree and return the resulting
* content tree.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param node
* the document/element to unmarshal XML data from.
* The caller must support at least Document and Element.
* @return the newly created root object of the java content tree
--- 479,533 ----
/**
* Unmarshal XML data from the specified URL and return the resulting
* content tree.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param url the url to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the URL parameter is null
*/
public Object unmarshal( java.net.URL url ) throws JAXBException;
/**
* Unmarshal XML data from the specified SAX InputSource and return the
* resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param source the input source to unmarshal XML data from
* @return the newly created root object of the java content tree
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the InputSource parameter is null
*/
public Object unmarshal( org.xml.sax.InputSource source ) throws JAXBException;
/**
* Unmarshal global XML data from the specified DOM tree and return the resulting
* content tree.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* @param node
* the document/element to unmarshal XML data from.
* The caller must support at least Document and Element.
* @return the newly created root object of the java content tree
*** 536,546 ****
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the Node parameter is null
* @see #unmarshal(org.w3c.dom.Node, Class)
*/
public Object unmarshal( org.w3c.dom.Node node ) throws JAXBException;
--- 536,546 ----
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the Node parameter is null
* @see #unmarshal(org.w3c.dom.Node, Class)
*/
public Object unmarshal( org.w3c.dom.Node node ) throws JAXBException;
*** 548,574 ****
/**
* Unmarshal XML data by JAXB mapped {@code declaredType}
* and return the resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
*
* @param node
* the document/element to unmarshal XML data from.
* The caller must support at least Document and Element.
* @param declaredType
* appropriate JAXB mapped class to hold {@code node}'s XML data.
*
! * @return <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element</a> representation of {@code node}
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( org.w3c.dom.Node node, Class<T> declaredType ) throws JAXBException;
--- 548,574 ----
/**
* Unmarshal XML data by JAXB mapped {@code declaredType}
* and return the resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
*
* @param node
* the document/element to unmarshal XML data from.
* The caller must support at least Document and Element.
* @param declaredType
* appropriate JAXB mapped class to hold {@code node}'s XML data.
*
! * @return <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element</a> representation of {@code node}
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( org.w3c.dom.Node node, Class<T> declaredType ) throws JAXBException;
*** 576,586 ****
/**
* Unmarshal XML data from the specified XML Source and return the
* resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* <p>
* <a name="saxParserPlugable"></a>
* <b>SAX 2.0 Parser Pluggability</b>
* <p>
--- 576,586 ----
/**
* Unmarshal XML data from the specified XML Source and return the
* resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* <p>
* <a name="saxParserPlugable"></a>
* <b>SAX 2.0 Parser Pluggability</b>
* <p>
*** 622,632 ****
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the Source parameter is null
* @see #unmarshal(javax.xml.transform.Source, Class)
*/
public Object unmarshal( javax.xml.transform.Source source )
--- 622,632 ----
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the Source parameter is null
* @see #unmarshal(javax.xml.transform.Source, Class)
*/
public Object unmarshal( javax.xml.transform.Source source )
*** 639,663 ****
*
* <p>
* Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
*
* <p>
! * See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#saxParserPlugable">SAX 2.0 Parser Pluggability</a>
*
* @param source the XML Source to unmarshal XML data from (providers are
* only required to support SAXSource, DOMSource, and StreamSource)
* @param declaredType
* appropriate JAXB mapped class to hold {@code source}'s xml root element
! * @return Java content rooted by <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element</a>
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( javax.xml.transform.Source source, Class<T> declaredType )
--- 639,663 ----
*
* <p>
* Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
*
* <p>
! * See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#saxParserPlugable">SAX 2.0 Parser Pluggability</a>
*
* @param source the XML Source to unmarshal XML data from (providers are
* only required to support SAXSource, DOMSource, and StreamSource)
* @param declaredType
* appropriate JAXB mapped class to hold {@code source}'s xml root element
! * @return Java content rooted by <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element</a>
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( javax.xml.transform.Source source, Class<T> declaredType )
*** 666,676 ****
/**
* Unmarshal XML data from the specified pull parser and return the
* resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* <p>
* This method assumes that the parser is on a START_DOCUMENT or
* START_ELEMENT event. Unmarshalling will be done from this
* start event to the corresponding end event. If this method
--- 666,676 ----
/**
* Unmarshal XML data from the specified pull parser and return the
* resulting content tree.
*
* <p>
! * Implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root Element</a>.
*
* <p>
* This method assumes that the parser is on a START_DOCUMENT or
* START_ELEMENT event. Unmarshalling will be done from this
* start event to the corresponding end event. If this method
*** 686,696 ****
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the {@code reader} parameter is null
* @throws IllegalStateException
* If {@code reader} is not pointing to a START_DOCUMENT or
* START_ELEMENT event.
--- 686,696 ----
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the {@code reader} parameter is null
* @throws IllegalStateException
* If {@code reader} is not pointing to a START_DOCUMENT or
* START_ELEMENT event.
*** 716,734 ****
* @param reader
* The parser to be read.
* @param declaredType
* appropriate JAXB mapped class to hold {@code reader}'s START_ELEMENT XML data.
*
! * @return content tree rooted by <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLStreamReader reader, Class<T> declaredType ) throws JAXBException;
--- 716,734 ----
* @param reader
* The parser to be read.
* @param declaredType
* appropriate JAXB mapped class to hold {@code reader}'s START_ELEMENT XML data.
*
! * @return content tree rooted by <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLStreamReader reader, Class<T> declaredType ) throws JAXBException;
*** 736,746 ****
/**
* Unmarshal XML data from the specified pull parser and return the
* resulting content tree.
*
* <p>
! * This method is an <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root method</a>.
*
* <p>
* This method assumes that the parser is on a START_DOCUMENT or
* START_ELEMENT event. Unmarshalling will be done from this
* start event to the corresponding end event. If this method
--- 736,746 ----
/**
* Unmarshal XML data from the specified pull parser and return the
* resulting content tree.
*
* <p>
! * This method is an <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalGlobal">Unmarshal Global Root method</a>.
*
* <p>
* This method assumes that the parser is on a START_DOCUMENT or
* START_ELEMENT event. Unmarshalling will be done from this
* start event to the corresponding end event. If this method
*** 756,766 ****
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the {@code reader} parameter is null
* @throws IllegalStateException
* If {@code reader} is not pointing to a START_DOCUMENT or
* START_ELEMENT event.
--- 756,766 ----
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If the {@code reader} parameter is null
* @throws IllegalStateException
* If {@code reader} is not pointing to a START_DOCUMENT or
* START_ELEMENT event.
*** 773,783 ****
/**
* Unmarshal root element to JAXB mapped {@code declaredType}
* and return the resulting content tree.
*
* <p>
! * This method implements <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">unmarshal by declaredType</a>.
*
* <p>
* This method assumes that the parser is on a START_DOCUMENT or
* START_ELEMENT event. Unmarshalling will be done from this
* start event to the corresponding end event. If this method
--- 773,783 ----
/**
* Unmarshal root element to JAXB mapped {@code declaredType}
* and return the resulting content tree.
*
* <p>
! * This method implements <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalByDeclaredType">unmarshal by declaredType</a>.
*
* <p>
* This method assumes that the parser is on a START_DOCUMENT or
* START_ELEMENT event. Unmarshalling will be done from this
* start event to the corresponding end event. If this method
*** 787,805 ****
* @param reader
* The parser to be read.
* @param declaredType
* appropriate JAXB mapped class to hold {@code reader}'s START_ELEMENT XML data.
*
! * @return content tree rooted by <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLEventReader reader, Class<T> declaredType ) throws JAXBException;
--- 787,805 ----
* @param reader
* The parser to be read.
* @param declaredType
* appropriate JAXB mapped class to hold {@code reader}'s START_ELEMENT XML data.
*
! * @return content tree rooted by <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
*
* @throws JAXBException
* If any unexpected errors occur while unmarshalling
* @throws UnmarshalException
* If the {@link ValidationEventHandler ValidationEventHandler}
* returns false from its {@code handleEvent} method or the
* {@code Unmarshaller} is unable to perform the XML to Java
! * binding. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#unmarshalEx">Unmarshalling XML Data</a>
* @throws IllegalArgumentException
* If any parameter is null
* @since 1.6, JAXB 2.0
*/
public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLEventReader reader, Class<T> declaredType ) throws JAXBException;
*** 908,918 ****
/**
* Set the particular property in the underlying implementation of
* {@code Unmarshaller}. This method can only be used to set one of
* the standard JAXB defined properties above or a provider specific
* property. Attempting to set an undefined property will result in
! * a PropertyException being thrown. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#supportedProps">
* Supported Properties</a>.
*
* @param name the name of the property to be set. This value can either
* be specified using one of the constant fields or a user
* supplied string.
--- 908,918 ----
/**
* Set the particular property in the underlying implementation of
* {@code Unmarshaller}. This method can only be used to set one of
* the standard JAXB defined properties above or a provider specific
* property. Attempting to set an undefined property will result in
! * a PropertyException being thrown. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#supportedProps">
* Supported Properties</a>.
*
* @param name the name of the property to be set. This value can either
* be specified using one of the constant fields or a user
* supplied string.
*** 929,939 ****
/**
* Get the particular property in the underlying implementation of
* {@code Unmarshaller}. This method can only be used to get one of
* the standard JAXB defined properties above or a provider specific
* property. Attempting to get an undefined property will result in
! * a PropertyException being thrown. See <a href="{@docRoot}/javax/xml/bind/Unmarshaller.html#supportedProps">
* Supported Properties</a>.
*
* @param name the name of the property to retrieve
* @return the value of the requested property
*
--- 929,939 ----
/**
* Get the particular property in the underlying implementation of
* {@code Unmarshaller}. This method can only be used to get one of
* the standard JAXB defined properties above or a provider specific
* property. Attempting to get an undefined property will result in
! * a PropertyException being thrown. See <a href="{@docRoot}/java/xml/bind/Unmarshaller.html#supportedProps">
* Supported Properties</a>.
*
* @param name the name of the property to retrieve
* @return the value of the requested property
*
< prev index next >