[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add sxml->xml example code in docs.
From: |
Alexandros Theodotou |
Subject: |
[PATCH] Add sxml->xml example code in docs. |
Date: |
Sat, 12 Feb 2022 22:32:04 +0000 |
* 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Add sxml->xml example code in docs.,
Alexandros Theodotou <=