[plt-scheme] Re: comments in xexpr - how to preserve?

From: Benjamin Simon (ben at amazingmedia.com)
Date: Wed Aug 6 11:32:22 EDT 2003

>>>>> "JM" == Jacob Matthews <jacobm at cs.uchicago.edu> writes:

 JM> The x-expressions of the xml library support user-created documents
 JM> including comments: just use (make-comment <string>). For example:

 JM> ---
 >> (define xpr `(hello () (world ,(make-comment "this is a comment"))))
 >> (write-xml/content (xexpr->xml xpr))

 JM> <hello><world><!--this is a comment--></world></hello>

Excellent -- I enhanced my sxml->xexpr function to call `make-comment'
when it notices (*comment* ...) and now I'm all set.


Ben Simon                                     Amazing Media, Inc.
(703) 234-5342 (work)                       (703) 937-7779 (cell)

Posted on the users mailing list.