
(/VERSIONCHECK 2) 

(DEFUN |XML;writeXml;XeSV;1| (|content| |filename| $)
  (PROG (#1=#:G1801 |line| |lines| |s1| |f1|)
    (RETURN
     (SEQ
      (LETT |f1|
            (SPADCALL (SPADCALL |filename| (QREFELT $ 8)) "output"
                      (QREFELT $ 10))
            . #2=(|XML;writeXml;XeSV;1|))
      (LETT |s1| "<?xml version=" . #2#)
      (LETT |s1| (SPADCALL |s1| (SPADCALL (QREFELT $ 12)) (QREFELT $ 13))
            . #2#)
      (LETT |s1| (STRCONC |s1| "1.0") . #2#)
      (LETT |s1| (SPADCALL |s1| (SPADCALL (QREFELT $ 12)) (QREFELT $ 13))
            . #2#)
      (LETT |s1| (STRCONC |s1| " encoding=") . #2#)
      (LETT |s1| (SPADCALL |s1| (SPADCALL (QREFELT $ 12)) (QREFELT $ 13))
            . #2#)
      (LETT |s1| (STRCONC |s1| "UTF-8") . #2#)
      (LETT |s1| (SPADCALL |s1| (SPADCALL (QREFELT $ 12)) (QREFELT $ 13))
            . #2#)
      (LETT |s1| (STRCONC |s1| " standalone=") . #2#)
      (LETT |s1| (SPADCALL |s1| (SPADCALL (QREFELT $ 12)) (QREFELT $ 13))
            . #2#)
      (LETT |s1| (STRCONC |s1| "no") . #2#)
      (LETT |s1| (SPADCALL |s1| (SPADCALL (QREFELT $ 12)) (QREFELT $ 13))
            . #2#)
      (LETT |s1| (STRCONC |s1| "?>") . #2#) (SPADCALL |f1| |s1| (QREFELT $ 14))
      (LETT |lines| (SPADCALL |content| (QREFELT $ 17)) . #2#)
      (SEQ (LETT |line| NIL . #2#) (LETT #1# |lines| . #2#) G190
           (COND
            ((OR (ATOM #1#) (PROGN (LETT |line| (CAR #1#) . #2#) NIL))
             (GO G191)))
           (SEQ (EXIT (SPADCALL |f1| |line| (QREFELT $ 14))))
           (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
      (EXIT (SPADCALL |f1| (QREFELT $ 18))))))) 

(DEFUN |XML;writeVRML;XeSV;2| (|content| |filename| $)
  (PROG (|f1|)
    (RETURN
     (SEQ
      (LETT |f1|
            (SPADCALL (SPADCALL |filename| (QREFELT $ 8)) "output"
                      (QREFELT $ 10))
            |XML;writeVRML;XeSV;2|)
      (SPADCALL |f1| "#VRML V2.0 utf8" (QREFELT $ 14))
      (SPADCALL |content| |f1| (QREFELT $ 21))
      (EXIT (SPADCALL |f1| (QREFELT $ 18))))))) 

(DEFUN |ExportXml| #1=()
  (PROG #1#
    (RETURN
     (PROG (#2=#:G1805)
       (RETURN
        (COND
         ((LETT #2# (HGET |$ConstructorCache| '|ExportXml|) . #3=(|ExportXml|))
          (|CDRwithIncrement| (CDAR #2#)))
         ('T
          (UNWIND-PROTECT
              (PROG1
                  (CDDAR
                   (HPUT |$ConstructorCache| '|ExportXml|
                         (LIST (CONS NIL (CONS 1 (|ExportXml;|))))))
                (LETT #2# T . #3#))
            (COND ((NOT #2#) (HREM |$ConstructorCache| '|ExportXml|))))))))))) 

(DEFUN |ExportXml;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|ExportXml|) . #1=(|ExportXml|))
      (LETT $ (GETREFV 23) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|ExportXml| NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      (SETF |pv$| (QREFELT $ 3))
      $)))) 

(MAKEPROP '|ExportXml| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|String|) (|FileName|) (0 . |coerce|)
              (|TextFile|) (5 . |open|) (|Character|) (11 . |quote|)
              (15 . |concat|) (21 . |writeLine!|) (|List| 6) (|XmlElement|)
              (27 . |coerce|) (32 . |close!|) (|Void|) |XML;writeXml;XeSV;1|
              (37 . |outputVRML|) |XML;writeVRML;XeSV;2|)
           '#(|writeXml| 43 |writeVRML| 49) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 22
                                                 '(1 7 0 6 8 2 9 0 7 6 10 0 11
                                                   0 12 2 6 0 0 11 13 2 9 6 0 6
                                                   14 1 16 15 0 17 1 9 0 0 18 2
                                                   16 19 0 9 21 2 0 19 16 6 20
                                                   2 0 19 16 6 22)))))
           '|lookupComplete|)) 

(MAKEPROP '|ExportXml| 'NILADIC T) 
