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

📄 client.java

📁 weblogic_src_xml.rar
💻 JAVA
字号:
package examples.xml.orderParser;

/**
 * Initiates the parsing of an XML document into
 * business objects using the XMLInputStream API.
 *
 * @author Copyright (c) 2003 by BEA Systems, Inc. All Rights Reserved.
 */
public class Client {

  /**
   * Run this Client from the command line.
   * <p>
   * The Client expects one argument: the name of the XML file to be parsed.
   * The Client looks for the XML file in the current directory.
   * <p>
   * To run the client, enter this command at the command line: 
   * <tt>java examples.xml.orderParser.Client filename.xml</tt>
   */
  public static void main(String[] args) {
        // Validate params
        if (args.length < 1) {
      System.out.println("Usage:  java examples.xml.orderParser.Client filename.xml");
    } else {
      StreamParser sp = new StreamParser();
      try {
        // Get inputsteam and pass for processing.
        sp.parse(sp.getInputStream(args[0]));
        // Print resulting order business object.
        sp.getOrderBO().printOrder();
        System.out.println("Successfully handled the document");
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
}

⌨️ 快捷键说明

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