/** Write an attribute pair <code>name="value"</code> where the value is written using safe(). */ public final XWriter attr(String name, String value) { write(name); write('='); write('"'); safe(value); write('"'); return this; }
/** Write the specified number of spaces. */ public final XWriter indent(int indent) { write(getSpaces(indent)); return this; }
/** Write a newline character and return this. */ public final XWriter nl() { write('\n'); return this; }
/** Write the specified double and return this. */ public final XWriter w(double x) { write(String.valueOf(x)); return this; }
/** Write the specified float and return this. */ public final XWriter w(float x) { write(String.valueOf(x)); return this; }
/** Write the specified char and return this. */ public final XWriter w(char x) { write(x); return this; }
/** Write the specified boolean and return this. */ public final XWriter w(boolean x) { write(String.valueOf(x)); return this; }
/** Write the specified Object and return this. */ public XWriter w(Object x) { write(String.valueOf(x)); return this; }
/** This write the standard prolog <code><?xml version="1.0" encoding="UTF-8"?></code> */ public XWriter prolog() { write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); return this; }