diff --git a/blanksvg.js b/blanksvg.js index 064acad4..b49b90df 100644 --- a/blanksvg.js +++ b/blanksvg.js @@ -319,63 +319,68 @@ function assignAttr(Node,Attr){ function SVGclear_svg() { - for(var i=1; i=0; i--) - { - attr = attrs.item(i); - out += " " + attr.nodeName + "=\"" + attr.nodeValue+ "\""; - } + for (i=0; i\n"; - } - else - { - out += " />\n"; - } + for (i=attrs.length-1; i>=0; i--) + { + attr = attrs.item(i); + out += " " + attr.nodeName + "=\"" + attr.nodeValue+ "\""; + } - } - return out; - } + + + if (elem.hasChildNodes()) + { + out += ">\n"; + indent++; + for (i=0; i\n"; + } + else + { + out += " />\n"; + } + + } + return out; +} function SVGsubmit_svg(){ var str = " \