Пример #1
0
 /**
  * Sets the number of indent spaces to use for pretty-printing. If not set, then the XML will not
  * be pretty-printed.
  *
  * @param indent the number of spaces in the indent string or null not to pretty-print (disabled
  *     by default)
  * @return this
  */
 public ChainingXmlWriter indent(Integer indent) {
   outputProperties.setIndent(indent);
   return this;
 }
Пример #2
0
 /**
  * Sets the XML version to use. Note that many JDKs only support 1.0 natively. For XML 1.1
  * support, add a JAXP library like <a href=
  * "http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22xalan%22%20AND%20a%3A%22xalan%22"
  * >xalan</a> to your project.
  *
  * @param xmlVersion the XML version (defaults to "1.0")
  * @return this
  */
 public ChainingXmlWriter xmlVersion(String xmlVersion) {
   outputProperties.setXmlVersion(xmlVersion);
   return this;
 }
Пример #3
0
 /**
  * Assigns an output property to the JAXP transformer (see {@link Transformer#setOutputProperty}).
  *
  * @param name the property name
  * @param value the property value
  * @return this
  */
 public ChainingXmlWriter outputProperty(String name, String value) {
   outputProperties.put(name, value);
   return this;
 }