 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Records
-
-(declare emit-element)
+;; Records for XML node types
+
+(declare emit-element emit-comment emit-cdata emit-pi)
 
 (defrecord Element [tag attrs content]
   

      
      )))



(defn parse [in]
  (-> in
      sax-seq
      throw-on-error
      merge-text
      (ignore :start-cdata :end-cdata)
      (ignore :start-prefix-mapping :end-prefix-mapping)
      (ignore :comment)
      to-nodes
      ffirst
      ))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Emitting XML

    (remove ignorable? events)))


(defn events->nodes
  "Returns a 2-element vector containing:
   1) A seq of sibling nodes extracted from the event stream, and
   2) A seq of the unconsumed events.
