Added a basic indenting XML writer.
[jsvc.git] / src / dolda / jsvc / next / XmlWriter.java
index 6e7c968..a1004e4 100644 (file)
@@ -142,7 +142,7 @@ public class XmlWriter {
        }
        
        if(postbreak(out, el))
-           out.indent(indent);
+           out.write('\n');
     }
     
     protected void text(ColumnWriter out, String s, int indent) throws IOException {
@@ -201,15 +201,4 @@ public class XmlWriter {
        write(w);
        w.flush();
     }
-    
-    public static void main(String[] args) throws Exception {
-       Html barda = Html.xhtml11("Barda");
-       barda.addcss("/slen.css", "Test");
-       barda.insert("body", barda.el("h1", barda.text("Mast")));
-       barda.finalise();
-       XmlWriter w = new XmlWriter(barda.doc);
-       w.setnsname(Html.ns, null);
-       w.write(System.out);
-       System.out.flush();
-    }
 }