Introduce connection modes
[eow] / scratch.lisp
1 (setf *r* (drakma:http-request "http://gdata.youtube.com/feeds/videos"))
2
3 ;; DOM
4 (setf *d* (cxml:parse *r* (cxml-dom:make-dom-builder)))
5 (dom:child-nodes *d*)
6 (dom:get-elements-by-tag-name *d* "entry")
7 (setf *c* (aref (dom:get-elements-by-tag-name *d* "entry") 0))
8 (dom:map-document (cxml:make-character-stream-sink *standard-output*) *c*)
9
10 ;; Klacks
11 (setf *s* (cxml:make-source *r*))
12 (klacks:peek-next *s*)
13 (klacks:find-element *s* "entry")
14 (klacks:serialize-element *s* (cxml-xmls:make-xmls-builder))