OBJS = xml
INTF = xml.cmi
LIBS = xml-light2.cma xml-light2.cmxa
+PROGRAMS = xmlpp
-all: $(INTF) $(LIBS) $(PROGRAMS)
+all: $(INTF) $(LIBS)
bins: $(PROGRAMS)
libs: $(LIBS)
+xmlpp: xmlpp.ml all
+ $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../stdext stdext.cmxa xml-light2.cmxa -linkpkg -o $@ $<
+
xml-light2.cmxa: $(foreach obj,$(OBJS),$(obj).cmx)
$(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmx)
--- /dev/null
+(*
+ * Copyright (C) 2006-2009 Citrix Systems Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * 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 Lesser General Public License for more details.
+ *)
+
+open Xml
+
+let _ =
+ let xml = Xml.parse_in stdin in
+ print_endline (Xml.to_string_fmt xml)