[racket] cdata section is not normalized by read-xml

From: YC (yinso.chen at gmail.com)
Date: Tue Nov 9 23:53:21 EST 2010

Hi all -

read-xml apparently does not normalize/strip the <![CDATA[ ... ]]> wrapper
when creating the cdata struct.  Is there a reason why they are not
stripped?

#lang scheme
(require xml)

(define xml "<test><![CDATA[this is cdata]]></test>")

(define xexpr (xml->xexpr (document-element (read-xml (open-input-string
xml)))))

(cdata-string (last xexpr))
;; => "<![CDATA[this is cdata]]>"
;; better as => "this is cdata"


Thanks,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101109/f0cf5aac/attachment.html>

Posted on the users mailing list.