3 Serialization
Serializes the SXML node or nodeset sxml-obj into XML, with
indentation to facilitate readability by a human.
If dest is not supplied, the function returns a string that
contains the serialized representation of the sxml-obj. If
dest is supplied and is a port, the functions write the
serialized representation of sxml-obj to this port. If
dest is supplied and is a string, this string is treated as
an output filename, the serialized representation of
sxml-obj is written to that filename. If a file with the
given name already exists, the effect is unspecified.
Examples: |
> (srl:sxml->xml '(zippy (pippy (@ (pigtails "2")) "ab") "bc")) | "<zippy><pippy pigtails=\"2\">ab</pippy>bc</zippy>" | | <zippy><pippy pigtails="2">ab</pippy>bc</zippy> | | | <doll level="4"> | <doll level="3"> | <doll level="2"> | <doll level="1"> | <doll level="0"> | <nothing /> | </doll> | </doll> | </doll> | </doll> | </doll> |
| |
|
Examples: |
| "<zippy><pippy pigtails=\"2\">ab</pippy>bc</zippy>" | | <zippy><pippy pigtails="2">ab</pippy>bc</zippy> | | | <doll level="4"><doll level="3"><doll level="2"><doll level="1"><doll level="0"><nothing /></doll></doll></doll></doll></doll> | |
|
Serializes the SXML node or nodeset sxml-obj into HTML, with
indentation to facilitate readability by a human.
If dest is not supplied, the functions return a string that
contains the serialized representation of the sxml-obj. If
dest is supplied and is a port, the functions write the
serialized representation of sxml-obj to this port. If
dest is supplied and is a string, this string is treated as
an output filename, the serialized representation of
sxml-obj is written to that filename. If a file with the
given name already exists, the effect is unspecified.