KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tests > org > enhydra > wireless > wml > Test


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Original Code is DigitalSesame
15  * Portions created by DigitalSesame are Copyright (C) 1997-2000 DigitalSesame
16  * All Rights Reserved.
17  *
18  * Contributor(s):
19  * - The Initial Developer of the Original Code is David Li.
20  * Portions created by David Li are Copyright (C) 1999-2000
21  * Topware Technology
22  *
23  * $Id: Test.java,v 1.2 2005/01/26 08:28:45 jkjome Exp $
24  */

25
26 package tests.org.enhydra.wireless.wml;
27
28 import org.enhydra.xml.io.DOMFormatter;
29 import org.enhydra.xml.io.OutputOptions;
30
31 /**
32  * Very simple test of WML and XMLC functionality.
33  */

34 public class Test {
35     public static void main(String JavaDoc args[]) {
36     try {
37         indexWML index = new indexWML();
38         index.getElementImg().setSrc("/foo/bar/test.wbmp");
39         indexBig5WML indexbig5 = new indexBig5WML();
40         
41         OutputOptions oos = new OutputOptions();
42         oos.setOmitEncoding(true);
43         oos.setJavaEncoding("ASCII");
44         DOMFormatter domf = new DOMFormatter(oos);
45         
46         System.out.println ("----- index.wml -----");
47         domf.write(index, System.out);
48         System.out.println ("----- index.big5.wml -----");
49         domf.write(indexbig5, System.out);
50     } catch (Exception JavaDoc e) {
51         e.printStackTrace();
52             System.exit(1);
53     }
54     }
55 }
56
Popular Tags