unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Add sxml->xml example code in docs.
@ 2022-02-12 22:32 Alexandros Theodotou
  0 siblings, 0 replies; only message in thread
From: Alexandros Theodotou @ 2022-02-12 22:32 UTC (permalink / raw)
  To: guile-devel; +Cc: Alexandros Theodotou

* 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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-12 22:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12 22:32 [PATCH] Add sxml->xml example code in docs Alexandros Theodotou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).