Documentation of 'net.n3.nanoxml.XMLWriter' Java class
XMLWriter
net.n3.nanoxml

Class XMLWriter



  • public class XMLWriter
    extends java.lang.Object
    An XMLWriter writes XML data to a stream.
    See Also:
    IXMLElement, Writer
    • Constructor Summary

      Constructors 
      Constructor and Description
      XMLWriter(java.io.OutputStream stream)
      Creates a new XML writer.
      XMLWriter(java.io.Writer writer)
      Creates a new XML writer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void write(IXMLElement xml)
      Writes an XML element.
      void write(IXMLElement xml, boolean prettyPrint)
      Writes an XML element.
      void write(IXMLElement xml, boolean prettyPrint, int indent)
      Writes an XML element.
      void write(IXMLElement xml, boolean prettyPrint, int indent, boolean collapseEmptyElements)
      Writes an XML element.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLWriter

        public XMLWriter(java.io.Writer writer)
        Creates a new XML writer.
        Parameters:
        writer - where to write the output to.
      • XMLWriter

        public XMLWriter(java.io.OutputStream stream)
        Creates a new XML writer.
        Parameters:
        stream - where to write the output to.
    • Method Detail

      • write

        public void write(IXMLElement xml)
                   throws java.io.IOException
        Writes an XML element.
        Parameters:
        xml - the non-null XML element to write.
        Throws:
        java.io.IOException
      • write

        public void write(IXMLElement xml,
                          boolean prettyPrint)
                   throws java.io.IOException
        Writes an XML element.
        Parameters:
        xml - the non-null XML element to write.
        prettyPrint - if spaces need to be inserted to make the output more readable
        Throws:
        java.io.IOException
      • write

        public void write(IXMLElement xml,
                          boolean prettyPrint,
                          int indent)
                   throws java.io.IOException
        Writes an XML element.
        Parameters:
        xml - the non-null XML element to write.
        prettyPrint - if spaces need to be inserted to make the output more readable
        indent - how many spaces to indent the element.
        Throws:
        java.io.IOException
      • write

        public void write(IXMLElement xml,
                          boolean prettyPrint,
                          int indent,
                          boolean collapseEmptyElements)
                   throws java.io.IOException
        Writes an XML element.
        Parameters:
        xml - the non-null XML element to write.
        prettyPrint - if spaces need to be inserted to make the output more readable
        indent - how many spaces to indent the element.
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.