blob: cfc70a92bc5f1f9831f25eb0d16cbdc760b98420 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
(define-module (vcomponent formats xcal)
:use-module (sxml simple)
:use-module ((vcomponent formats xcal output)
:select (vcomponent->sxcal ns-wrap))
:use-module ((vcomponent formats xcal parse)
:select (sxcal->vcomponent))
:use-module ((hnh util) :select (->))
:export (serialize deserialize))
(define (serialize component port)
(-> (vcomponent->sxcal component)
ns-wrap
(sxml->xml port)
))
(define (serialize/object component)
(call-with-output-string (lambda (p) (serialize component p))))
(define (deserialize port)
(-> (xml->sxml port)
sxcal->vcomponent))
|