XMLWriter
Keywords: uk.ac.ic.doc.automed.xml.XMLWriter class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.xml
Class XMLWriter

    java.lang.Object
      uk.ac.ic.doc.automed.xml.XMLWriter

    public class XMLWriter

extends java.lang.Object

Constructor Summary
`XMLWriter()`

Method Summary
`void` | `closeTag()`
`void` | `createDomDocAsWell(java.io.OutputStream os)` for debug purposes you may want to create your XML via a DOM document builder
`java.lang.String` | `getCurrentTagName()`
`static java.lang.String` | `getDefaultEncoding()`
`java.lang.String` | `getDTD()`
`java.lang.String` | `getEncoding()`
`java.lang.String` | `getFullTagNames()`
`int` | `getIndentSize()`
`java.lang.String` | `getParentTagNames()`
`boolean` | `getPrettifyAttributes()`
`java.lang.String` | `getPublicName()`
`int` | `getTotalColumns()`
`boolean` | `getUseSplitCDATA()` due to optimization, writeCDATA() doesn't use the XMLSyntax.splitCDATA() for debug purposes you may want to make it use splitData
`java.lang.String` | `getXMLVersioni()`
`static void` | `main(java.lang.String[] args)`
`void` | `openTag(java.lang.String tagName)` Opening a tag will finish off the opening phase of the previously opend tag if it is still in the opening phase.
`static void` | `setDefaultEncoding(java.lang.String e)`
`void` | `setDTD(java.lang.String DTD)`
`void` | `setEncoding(java.lang.String encoding)`
`void` | `setIndentSize(int indentSize)`
`void` | `setPrettifyAttributes(boolean pa)`
`void` | `setPublicName(java.lang.String publicName)`
`void` | `setTotalColumns(int totalColumns)`
`void` | `setUseSplitCDATA(boolean b)`
`void` | `setXMLVersion(java.lang.String xmlVersion)`
`java.lang.StringBuffer` | `start()` Output will be appended to the (initially empty) returned supplied StringBuffer
`void` | `start(java.io.OutputStream os)` Output will be written to your supplied OutputStream using the encoding as returned by getEncoding()
`void` | `start(java.io.Writer w)` Output will be written to your supplied Writer.
`void` | `writeAttribute(java.lang.String name, boolean value)`
`void` | `writeAttribute(java.lang.String name, byte value)`
`void` | `writeAttribute(java.lang.String name, char value)`
`void` | `writeAttribute(java.lang.String name, double value)`
`void` | `writeAttribute(java.lang.String name, float value)`
`void` | `writeAttribute(java.lang.String name, int value)`
`void` | `writeAttribute(java.lang.String name, long value)`
`void` | `writeAttribute(java.lang.String name, java.lang.Object value)`
`void` | `writeAttribute(java.lang.String name, short value)`
`void` | `writeAttribute(java.lang.String name, java.lang.String value)`
`void` | `writeCDATA(java.lang.String text)`
`void` | `writeCharData(java.lang.String text)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLWriter

    public XMLWriter()

Method Detail

### getDefaultEncoding

    public static java.lang.String getDefaultEncoding()

### setDefaultEncoding

    public static void setDefaultEncoding(java.lang.String e)

### createDomDocAsWell

    public void createDomDocAsWell(java.io.OutputStream os)
                            throws javax.xml.parsers.ParserConfigurationException

  for debug purposes you may want to create your XML via a DOM document builder

  Throws:
    `javax.xml.parsers.ParserConfigurationException`

### getUseSplitCDATA

    public boolean getUseSplitCDATA()

  due to optimization, writeCDATA() doesn't use the XMLSyntax.splitCDATA() for debug purposes you may want to make it use splitData

### setUseSplitCDATA

    public void setUseSplitCDATA(boolean b)

### getXMLVersioni

    public java.lang.String getXMLVersioni()

### setXMLVersion

    public void setXMLVersion(java.lang.String xmlVersion)

### getEncoding

    public java.lang.String getEncoding()

### setEncoding

    public void setEncoding(java.lang.String encoding)

### getDTD

    public java.lang.String getDTD()

### setDTD

    public void setDTD(java.lang.String DTD)

### getPublicName

    public java.lang.String getPublicName()

### setPublicName

    public void setPublicName(java.lang.String publicName)

### getIndentSize

    public int getIndentSize()

### setIndentSize

    public void setIndentSize(int indentSize)

### getTotalColumns

    public int getTotalColumns()

### setTotalColumns

    public void setTotalColumns(int totalColumns)

### getPrettifyAttributes

    public boolean getPrettifyAttributes()

### setPrettifyAttributes

    public void setPrettifyAttributes(boolean pa)

### start

    public java.lang.StringBuffer start()
                                 throws java.io.IOException

  Output will be appended to the (initially empty) returned supplied StringBuffer

  Throws:
    `java.io.IOException`

### start

    public void start(java.io.OutputStream os)
               throws java.io.UnsupportedEncodingException,
                      java.io.IOException

  Output will be written to your supplied OutputStream using the encoding as returned by getEncoding()

  Throws:
    `java.io.UnsupportedEncodingException`
    `java.io.IOException`

### start

    public void start(java.io.Writer w)
               throws java.io.IOException

  Output will be written to your supplied Writer. If you wrap an OutputStream in a Writer, make sure you use the same encoding as returned by getEncoding() or your resulting XML's DOCTYPE declaration will have the incorrect encoding specified.

  Throws:
    `java.io.IOException`

### openTag

    public void openTag(java.lang.String tagName)
                 throws XMLException,
                        java.io.IOException

  Opening a tag will finish off the opening phase of the previously opend tag if it is still in the opening phase. The newly opened tag will remaing in the opening phase until it is closed, another tag is opened, any character data is written. You can only write an element's attributes while it is in its opening phase

  Throws:
    `XMLException`
    `java.io.IOException`

### closeTag

    public void closeTag()
                  throws XMLWriterException,
                         java.io.IOException

  Throws:
    `XMLWriterException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               boolean value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               byte value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               char value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               double value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               int value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               float value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               long value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               short value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               java.lang.Object value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeAttribute

    public void writeAttribute(java.lang.String name,
                               java.lang.String value)
                        throws XMLException,
                               java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeCharData

    public void writeCharData(java.lang.String text)
                       throws XMLException,
                              java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### writeCDATA

    public void writeCDATA(java.lang.String text)
                    throws XMLException,
                           java.io.IOException

  Throws:
    `XMLException`
    `java.io.IOException`

### getParentTagNames

    public java.lang.String getParentTagNames()

### getFullTagNames

    public java.lang.String getFullTagNames()

### getCurrentTagName

    public java.lang.String getCurrentTagName()

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD