Move xml->string to a more proper place
original commit: 5da56167a996f591f3f170b9ab0c06af8ca0c399
This commit is contained in:
parent
2dde4a25aa
commit
dd52a32d66
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
;; XML-like objects and functions, with rendering
|
;; 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
|
;; Represent attribute names as `foo:' symbols. They are made self-quoting in
|
||||||
|
@ -61,6 +61,10 @@
|
||||||
(define (output-xml content [p (current-output-port)])
|
(define (output-xml content [p (current-output-port)])
|
||||||
(output (disable-prefix (with-writer (xml-writer) content)) p))
|
(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
|
;; Structs for xml data: elements, literals, entities
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user