Move xml->string to a more proper place

original commit: 5da56167a996f591f3f170b9ab0c06af8ca0c399
This commit is contained in:
Eli Barzilay 2010-06-16 02:52:42 -04:00
parent 2dde4a25aa
commit dd52a32d66

View File

@ -2,7 +2,7 @@
;; XML-like objects and functions, with rendering
(require scribble/text)
(require scribble/text racket/port)
;; ----------------------------------------------------------------------------
;; Represent attribute names as `foo:' symbols. They are made self-quoting in
@ -61,6 +61,10 @@
(define (output-xml content [p (current-output-port)])
(output (disable-prefix (with-writer (xml-writer) content)) p))
(provide xml->string)
(define (xml->string content)
(with-output-to-string (lambda () (output-xml content))))
;; ----------------------------------------------------------------------------
;; Structs for xml data: elements, literals, entities