예제 #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;
 }
예제 #2
0
 /** Write the specified number of spaces. */
 public final XWriter indent(int indent) {
   write(getSpaces(indent));
   return this;
 }
예제 #3
0
 /** Write a newline character and return this. */
 public final XWriter nl() {
   write('\n');
   return this;
 }
예제 #4
0
 /** Write the specified double and return this. */
 public final XWriter w(double x) {
   write(String.valueOf(x));
   return this;
 }
예제 #5
0
 /** Write the specified float and return this. */
 public final XWriter w(float x) {
   write(String.valueOf(x));
   return this;
 }
예제 #6
0
 /** Write the specified char and return this. */
 public final XWriter w(char x) {
   write(x);
   return this;
 }
예제 #7
0
 /** Write the specified boolean and return this. */
 public final XWriter w(boolean x) {
   write(String.valueOf(x));
   return this;
 }
예제 #8
0
 /** Write the specified Object and return this. */
 public XWriter w(Object x) {
   write(String.valueOf(x));
   return this;
 }
예제 #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;
 }