unmarshaller.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,146 行 · 第 1/5 页

HTML
1,146
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data from the specified InputStream and return the  resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node)">unmarshal</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/org/w3c/dom/Node.html" title="class or interface in org.w3c.dom">Node</A>&nbsp;node)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal global XML data from the specified DOM tree and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE>&lt;T&gt; <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A>&lt;T&gt;</CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node, java.lang.Class)">unmarshal</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/org/w3c/dom/Node.html" title="class or interface in org.w3c.dom">Node</A>&nbsp;node,          <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;declaredType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data by JAXB mapped <tt>declaredType</tt> and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.Reader)">unmarshal</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A>&nbsp;reader)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data from the specified Reader and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source)">unmarshal</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform">Source</A>&nbsp;source)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data from the specified XML Source and return the  resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE>&lt;T&gt; <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A>&lt;T&gt;</CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source, java.lang.Class)">unmarshal</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform">Source</A>&nbsp;source,          <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;declaredType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data from the specified XML Source by <tt>declaredType</tt> and return the  resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.net.URL)">unmarshal</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data from the specified URL and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLEventReader)">unmarshal</A></B>(<A HREF="../../../javax/xml/stream/XMLEventReader.html" title="interface in javax.xml.stream">XMLEventReader</A>&nbsp;reader)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data from the specified pull parser and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE>&lt;T&gt; <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A>&lt;T&gt;</CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLEventReader, java.lang.Class)">unmarshal</A></B>(<A HREF="../../../javax/xml/stream/XMLEventReader.html" title="interface in javax.xml.stream">XMLEventReader</A>&nbsp;reader,          <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;declaredType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal root element to JAXB mapped <tt>declaredType</tt> and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLStreamReader)">unmarshal</A></B>(<A HREF="../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A>&nbsp;reader)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal XML data from the specified pull parser and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE>&lt;T&gt; <A HREF="../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A>&lt;T&gt;</CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.stream.XMLStreamReader, java.lang.Class)">unmarshal</A></B>(<A HREF="../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A>&nbsp;reader,          <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;declaredType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unmarshal root element to JAXB mapped <tt>declaredType</tt> and return the resulting content tree.</TD></TR></TABLE>&nbsp;<P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="unmarshal(java.io.File)"><!-- --></A><H3>unmarshal</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>unmarshal</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;f)                 throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE><DL><DD>Unmarshal XML data from the specified file and return the resulting content tree. <p> Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>f</CODE> - the file to unmarshal XML data from<DT><B>Returns:</B><DD>the newly created root object of the java content tree<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling<DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A>     returns false from its <tt>handleEvent</tt> method or the      <tt>Unmarshaller</tt> is unable to perform the XML to Java     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - If the file parameter is null</DL></DD></DL><HR><A NAME="unmarshal(java.io.InputStream)"><!-- --></A><H3>unmarshal</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>unmarshal</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is)                 throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE><DL><DD>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="#unmarshalGlobal">Unmarshal Global Root Element</a>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>is</CODE> - the InputStream to unmarshal XML data from<DT><B>Returns:</B><DD>the newly created root object of the java content tree<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling<DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A>     returns false from its <tt>handleEvent</tt> method or the      <tt>Unmarshaller</tt> is unable to perform the XML to Java     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - If the InputStream parameter is null</DL></DD></DL><HR><A NAME="unmarshal(java.io.Reader)"><!-- --></A><H3>unmarshal</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>unmarshal</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A>&nbsp;reader)                 throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE><DL><DD>Unmarshal XML data from the specified Reader and return the 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="#unmarshalGlobal">Unmarshal Global Root Element</a>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the Reader to unmarshal XML data from<DT><B>Returns:</B><DD>the newly created root object of the java content tree<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling<DD><CODE><A HREF="../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A>     returns false from its <tt>handleEvent</tt> method or the     <tt>Unmarshaller</tt> is unable to perform the XML to Java     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - If the InputStream parameter is null<DT><B>Since:</B></DT>  <DD>JAXB2.0</DD></DL></DD></DL><HR><A NAME="unmarshal(java.net.URL)"><!-- --></A><H3>unmarshal</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>unmarshal</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>&nbsp;url)                 throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE><DL><DD>Unmarshal XML data from the specified URL and return the resulting

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?