From c45d527fff67f3200b8a12dc40c611b715cd8468 Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Sun, 22 Sep 2019 10:28:56 +0200 Subject: [PATCH] [REF]Hy Base XML better naming for child --- hy_base/xml.hy | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hy_base/xml.hy b/hy_base/xml.hy index c603868..34d8f80 100644 --- a/hy_base/xml.hy +++ b/hy_base/xml.hy @@ -29,13 +29,13 @@ (defn xmlchild [parent children] "Handling of children (ie non root) XML Nodes with/o text and subchildren (recursive)" - (for [c children] - (if (string? c) - (setv (. parent text) c) + (for [child children] + (if (string? child) + (setv (. parent text) child) (do - (setv attrs (dfor [k v] (.items (get c "attrs")) [(str k) (str v)])) - (setv new_parent (.SubElement ET parent (get c "tag") attrs)) - (setv subchildren (get c "children")) + (setv attrs (dfor [k v] (.items (get child "attrs")) [(str k) (str v)])) + (setv new_parent (.SubElement ET parent (get child "tag") attrs)) + (setv subchildren (get child "children")) (if subchildren (xmlchild new_parent subchildren)))))) (defn xmln [tag &optional attrs children text]