<RefEntry id="string-X3Enodes"> <!-- This file is generated automatically from the DSSSL source. --> <!-- Do not edit this file! --> <?html-filename string-X3Enodes.html> <RefMeta> <RefEntryTitle>string->nodes</RefEntryTitle> <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo> </RefMeta> <RefNameDiv> <RefName>string->nodes</RefName> <RefPurpose>no documented purpose</RefPurpose> </RefNameDiv> <RefSynopsisDiv><Title>Synopsis</Title> <Synopsis> (string->nodes s) </Synopsis> </RefSynopsisDiv> <RefSect1><Title>Source Code</Title> <ProgramListing> (define (string->nodes s) ;; Escape XML characters... (let* ((achars (string-replace s "&" "&#38;#38;")) (bchars (string-replace achars "<" "&#38;#60;")) (cchars (string-replace bchars ">" "&#38;#62;"))) (let ((doc (string-append "<literal><!DOCTYPE doc [ <!ELEMENT " "doc - - (#PCDATA)> ]><doc>" cchars ";</doc>"))) (children (node-property 'docelem (sgml-parse doc)))))) </ProgramListing> </RefSect1> </RefEntry>