#!/bin/sh
: ; exec klone $0 "$@"
; The above line finds the klone executable in the $PATH

(setq args (getopts  USAGE: kxf2xml
Is a filter converting kxf to xml
))

(defun main ()
  (if args (setq in (open (0 args))) (setq in *standard-input*))
  (with (sxp:encoding "ISO-8859-1" sxp:standalone "yes")
    (setq tree (kxf:parse in :keep-comments t :keep-PIs t :keep-DTD t 
    ))
    (sxp:print tree () :encoding sxp:encoding 
      :standalone sxp:standalone)
))

;;=============================================================================
;;                    main
;;=============================================================================
(main)

;;; EMACS MODES
;;; Local Variables: ***
;;; mode:lisp ***
;;; End: ***
