📄 package-summary.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Fri Dec 05 15:19:25 PST 2003 -->
<TITLE>
examples.xml.sax (WebLogic Server 8.1 Examples)
</TITLE>
<META NAME="keywords" CONTENT="examples.xml.sax package">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="examples.xml.sax (WebLogic Server 8.1 Examples)";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</td><td valign=bottom align=right><b>WebLogic Server 8.1 Code Examples</b>, BEA Systems, Inc.</td></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../examples/xml/orderParser/package-summary.html"><B>PREV PACKAGE</B></A>
NEXT PACKAGE</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<H2>
Package examples.xml.sax
</H2>
This example demonstrates how to parse an XML document using a SAX parser obtained via JAXP.
<P>
<B>See:</B>
<BR>
<A HREF="#package_description"><B>Description</B></A>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="RequestHandler.html">RequestHandler</A></B></TD>
<TD>This class extends <tt>HandlerBase</tt> and is used to handle events
created as an XML document is parsed by a SAX compliant
parser.</TD>
</TR>
</TABLE>
<P>
<A NAME="package_description"><!-- --></A><H2>
Package examples.xml.sax Description
</H2>
<P>
<p>
This example demonstrates how to parse an XML document using a SAX parser obtained via JAXP.
<p>The example receives an XML file over HTTP from a client and uses the SAX API (via JAXP) to parse the document.
<p>
The example illustrates how to:
<p>
<ul>
<li>read an XML file and write it to an output stream.
<li>validate and parse XML data using a SAX parser.
<li>pass XML data between a client and a JSP via an HTTP POST.
</ul>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Additional Resources for examples.xml.sax</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B>Sax.jsp</B></TD>
<TD>The JSP that receives the XML data from the Java Client, parses it, and sends an acknowledgement back to the Client over HTTP.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B>purchaseorder.xml</B></TD>
<TD>The XML file that is passed between the Java Client and the JSP over HTTP.</TD>
</TR>
</TABLE>
<p>The following sections describe how to build and run the example.
<p>
<ol>
<li><a href="#Build the example">Build the example</a>
<li><a href="#Run the example">Run the example</a>
</ol>
<h3><a name="Build the example">Build the example</a></h3>
<p>
<ol>
<li>Set up your development shell as described in
<a href=../../examples.html#quick>Quick Start</a>.
<p>
<li>Change to the example directory:
<pre> prompt> cd <i>SAMPLES_HOME</i>\server\examples\src\examples\xml\sax</pre>
where <tt><i>SAMPLES_HOME</i></tt> refers to the main WebLogic Server samples
directory, such as <tt>c:\beahome\weblogic81\samples</tt>.
<p>
<li>Compile the example by executing the <a href=../../examples.html#buildScripts>Java ant command</a>:
<pre> prompt><b> ant </b></pre>
The Java ant command uses the <code>build.xml</code> file, located in the <font face
="Courier New" size = -1><i>SAMPLES_HOME</i>\server\examples\src\examples\xml\sax</font>
directory, to build the example, where <tt><i>SAMPLES_HOME</i></tt> refers to the
main WebLogic Server examples directory, such as <tt>d:\beahome\weblogic81\samples</tt>. The Java Ant command performs the following steps:
<p>
<ol type=a>
<li>Compiles the <tt>Client</tt>.
<li>Compiles the <tt>RequestHandler</tt> class into the <font face="Courier New" size = -1>WEB-INF\classes</font> directory of the examples Web application.
<li>Copies the <tt>Sax.jsp</tt> file into the examples Web application directory.
</ol>
</ol>
<h3><a name="Run the example"></a>Run the Example</h3>
<ol>
<li><a href=../../examples.html#startServer>Start the WebLogic Server</a> in a new command shell.
<p>
<li>In your development shell, run the <font face="Courier New" size = -1>Client</font> with the following command:
<pre> prompt><b> ant run </b> </pre>
</ol>
<h2>There's More...</h2>
Read more about:
<ul>
<li>XML in
<a href="http://e-docs.bea.com/wls/docs81/xml/index.html">Programming WebLogic XML</a>.
<p><li>JSP in
<a href="http://e-docs.bea.com/wls/docs81/jsp/index.html">Programming
WebLogic JSP</a>.
</ul>
<P>
<P>
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</td><td valign=bottom align=right>Documentation is available at<br> <a href=http://e-docs.bea.com/wls/docs81>http://e-docs.bea.com/wls/docs81</a></td></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../examples/xml/orderParser/package-summary.html"><B>PREV PACKAGE</B></A>
NEXT PACKAGE</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<a href=http://e-docs.bea.com/wls/docs81/copyright.html>Copyright</a> © 2003 BEA Systems, Inc. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -