📄 package-summary.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
WebLogic Server 8.1 Examples: Package examples.xml.dom
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 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>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<H2>
Package examples.xml.dom
</H2>
<html>
<body>
<p>
This example demonstrates how to parse an XML document using a DOM parser obtained via JAXP.
<P>
<B>See: </B>
<BR>
<A HREF="#package_description"><B>Description</B></A>
<P>
<P>
<A NAME="package_description"><!-- --></A><H2>
Package examples.xml.dom Description
</H2>
<p>This example demonstrates how to parse an XML document using a DOM parser obtained via JAXP.
<p>The example receives an XML file over HTTP from a client and uses the DOM 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 DOM 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.dom</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B>Dom.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>stock_quote.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\dom </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\dom</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>Copies the <tt>Dom.jsp</tt> file into the examples Web application directory.
</ol>
<p>
</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>
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 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>
</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 + -