⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 streamparser.html

📁 weblogic_src_xml.rar
💻 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:27 PST 2003 -->
<TITLE>
StreamParser (WebLogic Server 8.1 Examples)
</TITLE>
<META NAME="keywords" CONTENT="examples.xml.orderParser.StreamParser,StreamParser class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="StreamParser (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>&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>
  </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">
&nbsp;<A HREF="../../../examples/xml/orderParser/OrderConstants.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StreamParser.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<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>
<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>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
examples.xml.orderParser</FONT>
<BR>
Class StreamParser</H2>
<PRE>
java.lang.Object
  |
  +--<B>examples.xml.orderParser.StreamParser</B>
</PRE>
<HR>
<DL>
<DT>public class <B>StreamParser</B><DT>extends java.lang.Object</DL>

<P>
Demonstrates the parsing of an XML document into
 business objects using the XMLInputStream API.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Copyright (c) 2003 by BEA Systems, Inc. All Rights Reserved.</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#StreamParser()">StreamParser</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#getAttribute(weblogic.xml.stream.StartElement, java.lang.String)">getAttribute</A></B>(weblogic.xml.stream.StartElement&nbsp;pStartElement,
             java.lang.String&nbsp;pStr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extract known attribute value by name from a start element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;weblogic.xml.stream.XMLInputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#getInputStream(java.lang.String)">getInputStream</A></B>(java.lang.String&nbsp;pName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new XMLInputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../examples/xml/orderParser/OrderBO.html">OrderBO</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#getOrderBO()">getOrderBO</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns created order business object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#parse(weblogic.xml.stream.XMLInputStream)">parse</A></B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Controls the flow of the XML document's overall parsing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#processCustomer(weblogic.xml.stream.XMLInputStream)">processCustomer</A></B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Controls the flow of the customer parsing resulting
     in a customer business object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#processItem(weblogic.xml.stream.XMLInputStream)">processItem</A></B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses item data creating item business objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../examples/xml/orderParser/StreamParser.html#processItemList(weblogic.xml.stream.XMLInputStream)">processItemList</A></B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Controls the flow of items in an item list element.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="StreamParser()"><!-- --></A><H3>
StreamParser</H3>
<PRE>
public <B>StreamParser</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getAttribute(weblogic.xml.stream.StartElement, java.lang.String)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
public java.lang.String <B>getAttribute</B>(weblogic.xml.stream.StartElement&nbsp;pStartElement,
                                     java.lang.String&nbsp;pStr)
                              throws weblogic.xml.stream.XMLStreamException</PRE>
<DL>
<DD><p>Extract known attribute value by name from a start element.</p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>String Value of attribute.
<DT><B>Throws:</B>
<DD><CODE>weblogic.xml.stream.XMLStreamException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getInputStream(java.lang.String)"><!-- --></A><H3>
getInputStream</H3>
<PRE>
public weblogic.xml.stream.XMLInputStream <B>getInputStream</B>(java.lang.String&nbsp;pName)
                                                  throws weblogic.xml.stream.XMLStreamException,
                                                         java.io.FileNotFoundException</PRE>
<DL>
<DD><p>Creates a new XMLInputStream.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pName</CODE> - Name of XML document.
<DT><B>Returns:</B><DD>XMLInputStream
<DT><B>Throws:</B>
<DD><CODE>weblogic.xml.stream.XMLStreamException</CODE>
<DD><CODE>java.io.FileNotFoundException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getOrderBO()"><!-- --></A><H3>
getOrderBO</H3>
<PRE>
public <A HREF="../../../examples/xml/orderParser/OrderBO.html">OrderBO</A> <B>getOrderBO</B>()</PRE>
<DL>
<DD><p>Returns created order business object.</p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>OrderBO</DL>
</DD>
</DL>
<HR>

<A NAME="parse(weblogic.xml.stream.XMLInputStream)"><!-- --></A><H3>
parse</H3>
<PRE>
public void <B>parse</B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)
           throws java.lang.Exception,
                  weblogic.xml.stream.XMLStreamException</PRE>
<DL>
<DD><p>Controls the flow of the XML document's overall parsing.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pStream</CODE> - XML input stream.
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE>
<DD><CODE>weblogic.xml.stream.XMLStreamException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="processCustomer(weblogic.xml.stream.XMLInputStream)"><!-- --></A><H3>
processCustomer</H3>
<PRE>
public void <B>processCustomer</B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)
                     throws weblogic.xml.stream.XMLStreamException</PRE>
<DL>
<DD><p>Controls the flow of the customer parsing resulting
     in a customer business object.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pStream</CODE> - XML input stream.
<DT><B>Throws:</B>
<DD><CODE>weblogic.xml.stream.XMLStreamException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="processItem(weblogic.xml.stream.XMLInputStream)"><!-- --></A><H3>
processItem</H3>
<PRE>
public void <B>processItem</B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)
                 throws weblogic.xml.stream.XMLStreamException</PRE>
<DL>
<DD><p>Parses item data creating item business objects.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pStream</CODE> - XML input stream.
<DT><B>Throws:</B>
<DD><CODE>weblogic.xml.stream.XMLStreamException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="processItemList(weblogic.xml.stream.XMLInputStream)"><!-- --></A><H3>
processItemList</H3>
<PRE>
public void <B>processItemList</B>(weblogic.xml.stream.XMLInputStream&nbsp;pStream)
                     throws weblogic.xml.stream.XMLStreamException</PRE>
<DL>
<DD><p>Controls the flow of items in an item list element.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pStream</CODE> - XML input stream.
<DT><B>Throws:</B>
<DD><CODE>weblogic.xml.stream.XMLStreamException</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<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>&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>
  </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">
&nbsp;<A HREF="../../../examples/xml/orderParser/OrderConstants.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StreamParser.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<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>
<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>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<a href=http://e-docs.bea.com/wls/docs81/copyright.html>Copyright</a> &copy; 2003 BEA Systems, Inc. All Rights Reserved.
</BODY>
</HTML>

⌨️ 快捷键说明

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