From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alexandros Theodotou Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] Add sxml->xml example code in docs. Date: Sat, 12 Feb 2022 22:32:04 +0000 Message-ID: <20220212223204.410468-1-alex@zrythm.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22037"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alexandros Theodotou To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Feb 13 02:46:22 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJ3y1-0005VY-D9 for guile-devel@m.gmane-mx.org; Sun, 13 Feb 2022 02:46:21 +0100 Original-Received: from localhost ([::1]:33938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJ3xw-0003hJ-0J for guile-devel@m.gmane-mx.org; Sat, 12 Feb 2022 20:46:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJ0wF-0007VP-FI for guile-devel@gnu.org; Sat, 12 Feb 2022 17:32:19 -0500 Original-Received: from mout01.posteo.de ([185.67.36.141]:36761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJ0wC-0008Mh-5G for guile-devel@gnu.org; Sat, 12 Feb 2022 17:32:18 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2B4C6240026 for ; Sat, 12 Feb 2022 23:32:11 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Jx4wq2NQ4z9rwn; Sat, 12 Feb 2022 23:32:11 +0100 (CET) Received-SPF: pass client-ip=185.67.36.141; envelope-from=alex@zrythm.org; helo=mout01.posteo.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 12 Feb 2022 20:45:34 -0500 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21104 Archived-At: * 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{} GNU Guile +@end example @end deffn @deffn {Scheme Procedure} sxml->string sxml -- 2.35.1