Пример #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;
 }