|
Oracle TopLink Java API Reference 10g Release 3 (10.1.3.1) B28219-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.toplink.ox.XMLUnmarshaller
Class used to unmarshal XML 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:
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.
XMLContext
Field Summary | |
static int |
DTD_VALIDATION |
static int |
NONVALIDATING |
static int |
SCHEMA_VALIDATION |
Method Summary | |
org.xml.sax.EntityResolver |
getEntityResolver() Get the EntityResolver set on this XMLUnmarshaller |
org.xml.sax.ErrorHandler |
getErrorHandler() Get the ErrorHandler set on this XMLUnmarshaller |
XMLUnmarshallerHandler |
getUnmarshallerHandler() |
int |
getValidationMode() Get the validation mode set on this XMLUnmarshaller By default, the unmarshaller is set to be NONVALIDATING |
XMLContext |
getXMLContext() Return the instance of XMLContext that was used to create this instance of XMLUnmarshaller. |
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver) Set the EntityResolver on this XMLUnmarshaller |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler) Set the ErrorHandler on this XMLUnmarshaller |
void |
setValidationMode(int validationMode) Set the validation mode. |
java.lang.Object |
unmarshal(java.io.File file) PUBLIC: Read and parse the XML document from the file and map the XML data into an object. |
java.lang.Object |
unmarshal(java.io.File file, java.lang.Class clazz) PUBLIC: Read and parse the XML document from the file and map the XML data into an object. |
java.lang.Object |
unmarshal(org.xml.sax.InputSource inputSource) PUBLIC: Read and parse the XML document from the inputSource and map the XML data into an object. |
java.lang.Object |
unmarshal(org.xml.sax.InputSource inputSource, java.lang.Class clazz) PUBLIC: Read and parse the XML document from the inputSource and map the XML data into an object. |
java.lang.Object |
unmarshal(java.io.InputStream inputStream) PUBLIC: Read and parse the XML document from the inputStream and map the XML data into an object. |
java.lang.Object |
unmarshal(java.io.InputStream inputStream, java.lang.Class clazz) PUBLIC: Read and parse the XML document from the inputStream and map the XML data into an object. |
java.lang.Object |
unmarshal(org.w3c.dom.Node node) PUBLIC: Map the XML node into an object. |
java.lang.Object |
unmarshal(org.w3c.dom.Node node, java.lang.Class clazz) PUBLIC: Map the XML node into an object. |
java.lang.Object |
unmarshal(java.io.Reader reader) PUBLIC: Read and parse the XML document from the reader and map the XML data into an object. |
java.lang.Object |
unmarshal(java.io.Reader reader, java.lang.Class clazz) PUBLIC: Read and parse the XML document from the reader and map the XML data into an object. |
java.lang.Object |
unmarshal(javax.xml.transform.Source source) PUBLIC: Read and parse the XML document from the source and map the XML data into an object. |
java.lang.Object |
unmarshal(javax.xml.transform.Source source, java.lang.Class clazz) PUBLIC: Read and parse the XML document from the source and map the XML data into an object. |
java.lang.Object |
unmarshal(java.net.URL url) PUBLIC: Read and parse the XML document from the url and map the XML data into an object. |
java.lang.Object |
unmarshal(java.net.URL url, java.lang.Class clazz) PUBLIC: Read and parse the XML document from the url and map the XML data into an object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NONVALIDATING
public static final int SCHEMA_VALIDATION
public static final int DTD_VALIDATION
Method Detail |
public XMLContext getXMLContext()
public int getValidationMode()
public void setValidationMode(int validationMode)
validationMode
- sets the type of the validation mode to be usedpublic org.xml.sax.EntityResolver getEntityResolver()
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
entityResolver
- the EntityResolver to set on this XMLUnmarshallerpublic org.xml.sax.ErrorHandler getErrorHandler()
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
errorHandler
- the ErrorHandler to set on this XMLUnmarshallerpublic java.lang.Object unmarshal(java.io.File file) throws XMLMarshalException
file
- The file to unmarshal fromXMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(java.io.File file, java.lang.Class clazz) throws XMLMarshalException
file
- The file to unmarshal fromclazz
- The type of object to return.XMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(java.io.InputStream inputStream) throws XMLMarshalException
inputStream
- The inputStream to unmarshal fromXMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(java.io.InputStream inputStream, java.lang.Class clazz) throws XMLMarshalException
inputStream
- The inputStream to unmarshal fromclazz
- The type of object to return.XMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(java.io.Reader reader) throws XMLMarshalException
reader
- The reader to unmarshal fromXMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(java.io.Reader reader, java.lang.Class clazz) throws XMLMarshalException
reader
- The reader to unmarshal fromclazz
- The type of object to return.XMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(java.net.URL url) throws XMLMarshalException
url
- The url to unmarshal fromXMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(java.net.URL url, java.lang.Class clazz) throws XMLMarshalException
url
- The url to unmarshal fromclazz
- The type of object to return.XMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(org.xml.sax.InputSource inputSource) throws XMLMarshalException
inputSource
- The inputSource to unmarshal fromXMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(org.xml.sax.InputSource inputSource, java.lang.Class clazz) throws XMLMarshalException
inputSource
- The inputSource to unmarshal fromclazz
- The type of object to return.XMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(org.w3c.dom.Node node) throws XMLMarshalException
node
- The node to unmarshal fromXMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(org.w3c.dom.Node node, java.lang.Class clazz) throws XMLMarshalException
node
- The node to unmarshal fromclazz
- The type of object to return.XMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(javax.xml.transform.Source source) throws XMLMarshalException
source
- The source to unmarshal fromXMLMarshalException
- if an error occurred during unmarshallingpublic java.lang.Object unmarshal(javax.xml.transform.Source source, java.lang.Class clazz) throws XMLMarshalException
source
- The inputSource to unmarshal fromclazz
- The type of object to return.XMLMarshalException
- if an error occurred during unmarshallingpublic XMLUnmarshallerHandler getUnmarshallerHandler()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |