* doc/ref/sxml.texi (Reading and Writing XML): Add sxml->xml example code. --- doc/ref/sxml.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/ref/sxml.texi b/doc/ref/sxml.texi index 5f827916e..efd086be3 100644 --- a/doc/ref/sxml.texi +++ b/doc/ref/sxml.texi @@ -201,6 +201,17 @@ example to validate the parsed SXML against the doctype. Serialize the SXML tree @var{tree} as XML. The output will be written to the current output port, unless the optional argument @var{port} is present. + +@example +(sxml->xml + `(*TOP* + (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"") + (component + (@ (url "https://www.gnu.org/software/guile/") + (type "software")) + (name "GNU Guile")))) +@result{} <?xml version="1.0" encoding="UTF-8"?><component url="https://www.gnu.org/software/guile/" type="software"><name>GNU Guile</name></component> +@end example @end deffn @deffn {Scheme Procedure} sxml->string sxml -- 2.35.1