Android examples for XML:XML String
indent String in Writer
//package com.java2s; import java.io.IOException; import java.io.Writer; public class Main { public static void indent(Writer writer, int i) throws IOException { writer.write("\n"); printSpace(writer, i);/*w ww. j a va2 s . c o m*/ } public static void printSpace(Writer writer, int i) throws IOException { for (int j = 0; j < i; j++) writer.write(" "); } }