org.sonar.api.utils.text
Class XmlWriter

java.lang.Object
  extended by org.sonar.api.utils.text.XmlWriter

public class XmlWriter
extends Object

TODO document that output is UTF-8


Method Summary
 XmlWriter begin(String nodeName)
           
 void close()
           
 XmlWriter declaration()
           
 XmlWriter end()
           
 XmlWriter end(String unused)
          Same as end().
static XmlWriter of(Writer writer)
           
 XmlWriter prop(String nodeName, boolean value)
           
 XmlWriter prop(String nodeName, double value)
           
 XmlWriter prop(String nodeName, long value)
           
 XmlWriter prop(String nodeName, Number value)
           
 XmlWriter prop(String nodeName, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

of

public static XmlWriter of(Writer writer)

declaration

public XmlWriter declaration()

begin

public XmlWriter begin(String nodeName)

end

public XmlWriter end()

end

public XmlWriter end(String unused)
Same as end(). The parameter is unused. It's declared only to improve readability :
   xml.write("rules");
   xml.write("rule");
   // many other writes
   xml.end("rule");
   xml.end("rules");
 


prop

public XmlWriter prop(String nodeName,
                      @Nullable
                      String value)

prop

public XmlWriter prop(String nodeName,
                      @Nullable
                      Number value)

prop

public XmlWriter prop(String nodeName,
                      boolean value)

prop

public XmlWriter prop(String nodeName,
                      long value)

prop

public XmlWriter prop(String nodeName,
                      double value)

close

public void close()


Copyright © 2009–2015 SonarSource. All rights reserved.