w3cdomhandler.html

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

HTML
427
字号
<A NAME="W3CDomHandler()"><!-- --></A><H3>W3CDomHandler</H3><PRE>public <B>W3CDomHandler</B>()</PRE><DL><DD>Default constructor. It is up to a JAXB provider to decide which DOM implementation to use or how that is configured.<P></DL><HR><A NAME="W3CDomHandler(javax.xml.parsers.DocumentBuilder)"><!-- --></A><H3>W3CDomHandler</H3><PRE>public <B>W3CDomHandler</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/parsers/DocumentBuilder.html" title="class or interface in javax.xml.parsers">DocumentBuilder</A>&nbsp;builder)</PRE><DL><DD>Constructor that allows applications to specify which DOM implementation to be used.<P><DL><DT><B>Parameters:</B><DD><CODE>builder</CODE> - must not be null. JAXB uses this <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/parsers/DocumentBuilder.html" title="class or interface in javax.xml.parsers"><CODE>DocumentBuilder</CODE></A> to create      a new element.</DL></DL><!-- ============ 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="getBuilder()"><!-- --></A><H3>getBuilder</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/parsers/DocumentBuilder.html" title="class or interface in javax.xml.parsers">DocumentBuilder</A> <B>getBuilder</B>()</PRE><DL><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setBuilder(javax.xml.parsers.DocumentBuilder)"><!-- --></A><H3>setBuilder</H3><PRE>public void <B>setBuilder</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/parsers/DocumentBuilder.html" title="class or interface in javax.xml.parsers">DocumentBuilder</A>&nbsp;builder)</PRE><DL><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="createUnmarshaller(javax.xml.bind.ValidationEventHandler)"><!-- --></A><H3>createUnmarshaller</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/dom/DOMResult.html" title="class or interface in javax.xml.transform.dom">DOMResult</A> <B>createUnmarshaller</B>(<A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A>&nbsp;errorHandler)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#createUnmarshaller(javax.xml.bind.ValidationEventHandler)">DomHandler</A></CODE></B></DD><DD>When a JAXB provider needs to unmarshal a part of a document into an infoset representation, it first calls this method to create a <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Result.html" title="class or interface in javax.xml.transform"><CODE>Result</CODE></A> object. <p> A JAXB provider will then send a portion of the XML into the given result. Such a portion always form a subtree of the whole XML document rooted at an element.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#createUnmarshaller(javax.xml.bind.ValidationEventHandler)">createUnmarshaller</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html" title="interface in javax.xml.bind.annotation">DomHandler</A>&lt;<A HREF="http://java.sun.com/j2se/1.5/docs/api/org/w3c/dom/Element.html" title="class or interface in org.w3c.dom">Element</A>,<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/dom/DOMResult.html" title="class or interface in javax.xml.transform.dom">DOMResult</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>errorHandler</CODE> - if any error happens between the invocation of this method      and the invocation of <A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#getElement(ResultT)"><CODE>DomHandler.getElement(Result)</CODE></A>, they      must be reported to this handler.      The caller must provide a non-null error handler.      The <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Result.html" title="class or interface in javax.xml.transform"><CODE>Result</CODE></A> object created from this method      may hold a reference to this error handler.<DT><B>Returns:</B><DD>null if the operation fails. The error must have been reported      to the error handler.</DL></DD></DL><HR><A NAME="getElement(javax.xml.transform.dom.DOMResult)"><!-- --></A><H3>getElement</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/org/w3c/dom/Element.html" title="class or interface in org.w3c.dom">Element</A> <B>getElement</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/dom/DOMResult.html" title="class or interface in javax.xml.transform.dom">DOMResult</A>&nbsp;r)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#getElement(ResultT)">DomHandler</A></CODE></B></DD><DD>Once the portion is sent to the <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Result.html" title="class or interface in javax.xml.transform"><CODE>Result</CODE></A>. This method is called by a JAXB provider to obtain the unmarshalled element representation. <p> Multiple invocations of this method may return different objects. This method can be invoked only when the whole sub-tree are fed to the <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Result.html" title="class or interface in javax.xml.transform"><CODE>Result</CODE></A> object.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#getElement(ResultT)">getElement</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html" title="interface in javax.xml.bind.annotation">DomHandler</A>&lt;<A HREF="http://java.sun.com/j2se/1.5/docs/api/org/w3c/dom/Element.html" title="class or interface in org.w3c.dom">Element</A>,<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/dom/DOMResult.html" title="class or interface in javax.xml.transform.dom">DOMResult</A>&gt;</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - The <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Result.html" title="class or interface in javax.xml.transform"><CODE>Result</CODE></A> object created by <A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#createUnmarshaller(javax.xml.bind.ValidationEventHandler)"><CODE>DomHandler.createUnmarshaller(ValidationEventHandler)</CODE></A>.<DT><B>Returns:</B><DD>null if the operation fails. The error must have been reported      to the error handler.</DL></DD></DL><HR><A NAME="marshal(org.w3c.dom.Element, javax.xml.bind.ValidationEventHandler)"><!-- --></A><H3>marshal</H3><PRE>public <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> <B>marshal</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/org/w3c/dom/Element.html" title="class or interface in org.w3c.dom">Element</A>&nbsp;element,                      <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A>&nbsp;errorHandler)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#marshal(ElementT, javax.xml.bind.ValidationEventHandler)">DomHandler</A></CODE></B></DD><DD>This method is called when a JAXB provider needs to marshal an element to XML. <p> If non-null, the returned <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform"><CODE>Source</CODE></A> must contain a whole document rooted at one element, which will then be weaved into a bigger document that the JAXB provider is marshalling.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html#marshal(ElementT, javax.xml.bind.ValidationEventHandler)">marshal</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/annotation/DomHandler.html" title="interface in javax.xml.bind.annotation">DomHandler</A>&lt;<A HREF="http://java.sun.com/j2se/1.5/docs/api/org/w3c/dom/Element.html" title="class or interface in org.w3c.dom">Element</A>,<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/dom/DOMResult.html" title="class or interface in javax.xml.transform.dom">DOMResult</A>&gt;</CODE></DL></DD><DD><DL><DD><CODE>errorHandler</CODE> - Receives any errors happened during the process of converting      an element into a <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform"><CODE>Source</CODE></A>.      The caller must provide a non-null error handler.<DT><B>Returns:</B><DD>null if there was an error. The error should have been reported      to the handler.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../javax/xml/bind/annotation/DomHandler.html" title="interface in javax.xml.bind.annotation"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../javax/xml/bind/annotation/XmlAccessOrder.html" title="enum in javax.xml.bind.annotation"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?javax/xml/bind/annotation/W3CDomHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="W3CDomHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>

⌨️ 快捷键说明

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