aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/xml/writer.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/xml/writer.js b/lib/xml/writer.js
index a97d17e..239dd04 100644
--- a/lib/xml/writer.js
+++ b/lib/xml/writer.js
@@ -12,7 +12,15 @@ function writeString(root) {
standalone: true
});
root.children.forEach(function(child) {
- builder.element(child.name);
+ writeElement(builder, child);
});
return builder.end();
}
+
+
+function writeElement(builder, element) {
+ var elementBuilder = builder.element(element.name);
+ element.children.forEach(function(child) {
+ writeElement(elementBuilder, child);
+ });
+}