Ejemplo n.º 1
0
 /** 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;
 }
Ejemplo n.º 2
0
 /** Write the specified number of spaces. */
 public final XWriter indent(int indent) {
   write(getSpaces(indent));
   return this;
 }
Ejemplo n.º 3
0
 /** Write a newline character and return this. */
 public final XWriter nl() {
   write('\n');
   return this;
 }
Ejemplo n.º 4
0
 /** Write the specified double and return this. */
 public final XWriter w(double x) {
   write(String.valueOf(x));
   return this;
 }
Ejemplo n.º 5
0
 /** Write the specified float and return this. */
 public final XWriter w(float x) {
   write(String.valueOf(x));
   return this;
 }
Ejemplo n.º 6
0
 /** Write the specified char and return this. */
 public final XWriter w(char x) {
   write(x);
   return this;
 }
Ejemplo n.º 7
0
 /** Write the specified boolean and return this. */
 public final XWriter w(boolean x) {
   write(String.valueOf(x));
   return this;
 }
Ejemplo n.º 8
0
 /** Write the specified Object and return this. */
 public XWriter w(Object x) {
   write(String.valueOf(x));
   return this;
 }
Ejemplo n.º 9
0
 /** This write the standard prolog <code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code> */
 public XWriter prolog() {
   write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
   return this;
 }