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

    (emit-xml (str o) out))
  
  )

(defn emit
  "Turn an element into a String of XML."

  (emit-xml [this out]
    (emit-element this out))
  )

(defrecord Comment [^String text]
  XMLWritable
  (emit-xml [this out]
    (emit-comment this out)))

(defrecord CData [^String text]
  XMLWritable
  (emit-xml [this out]
    (emit-cdata this out)))

(defrecord PI [^String target ^String text]
  XMLWritable
  (emit-xml [this out]
    (emit-pi this out)))


(defn element
