// XML Parse Test // Copyright (c) 2003 IRIS Media Systems. All Rights Reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // Any feedback or questions contact: // IRIS Media Systems // 1630 North Main St #108 // Walnut Creek, CA 94596 // WWW: http://www.irismedia.com/ // E-Mail: rlai@irismedia.com // import com.irismedia.xml.*; import java.io.*; public class XMLParseTest { public static void main(String[] args) { if (args.length == 1) { try { XMLFile xmlFile = new XMLFile(); xmlFile.Read(args[0],false); xmlFile.Dump(); } catch (XMLException e) { System.err.println("Caught XMLException[XMLParseTest]:"); System.err.println(e.getMessage()); } catch (IOException e) { System.err.println("Caught IOException[XMLParseTest]:"); System.err.println(e.getMessage()); } /* try-catch... */ } else { System.out.println("Usage: XMLParseTest filename"); } /* if... */ } /* main... */ }