1 (*********************************************************************************)
4 (* Copyright (C) 2003 Institut National de Recherche en Informatique et *)
5 (* en Automatique. All rights reserved. *)
7 (* This program is free software; you can redistribute it and/or modify *)
8 (* it under the terms of the GNU General Public License as published by *)
9 (* the Free Software Foundation; either version 2 of the License, or *)
10 (* any later version. *)
12 (* This program is distributed in the hope that it will be useful, *)
13 (* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
14 (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
15 (* GNU General Public License for more details. *)
17 (* You should have received a copy of the GNU General Public License *)
18 (* along with this program; if not, write to the Free Software *)
19 (* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *)
22 (* Contact: Maxence.Guesdon@inria.fr *)
23 (*********************************************************************************)
26 if Array.length
Sys.argv
< 2 then
28 Printf.eprintf
"usage: %s <file to parse>\n" Sys.argv
.(0);
32 let ch = Rss.channel_of_file
Sys.argv
.(1) in
33 Rss.print_channel
Format.std_formatter
ch;
37 prerr_endline
(Xml.error e
);
39 | Xml_dtd.Parse_error e
->
40 prerr_endline
(Xml_dtd.parse_error e
);