Class XMLDumpWriter

java.lang.Object
org.serviceconnector.util.XMLDumpWriter

public class XMLDumpWriter extends Object
The Class XMLDumpWriter is a wrapper for XMLStreamWriter.
  • Constructor Details

  • Method Details

    • startDocument

      public void startDocument() throws XMLStreamException
      Starts new document. writes the encoding, sc version and current timestamp
      Throws:
      XMLStreamException - the xML stream exception
    • writeComment

      public void writeComment(String comment) throws XMLStreamException
      Write comment.
      Parameters:
      comment - the comment
      Throws:
      XMLStreamException - the xML stream exception
    • endDocument

      public void endDocument() throws XMLStreamException
      write the end tag to the document and flush it.
      Throws:
      XMLStreamException - the xML stream exception
    • writeStartElement

      public void writeStartElement(String value) throws XMLStreamException
      Starts a new element.
      Parameters:
      value - the value
      Throws:
      XMLStreamException - the xML stream exception
    • writeEndElement

      public void writeEndElement() throws XMLStreamException
      Closes the actual element.
      Throws:
      XMLStreamException - the xML stream exception
    • writeElement

      public void writeElement(String name, String value) throws XMLStreamException
      Write element.
      Parameters:
      name - the name
      value - the value
      Throws:
      XMLStreamException - the xML stream exception
    • writeElement

      public void writeElement(String name, int value) throws XMLStreamException
      Write element converting int value to String.
      Parameters:
      name - the name
      value - the int value
      Throws:
      XMLStreamException - the xML stream exception
    • writeElement

      public void writeElement(String name, long value) throws XMLStreamException
      Write element converting long value to String.
      Parameters:
      name - the name
      value - the long value
      Throws:
      XMLStreamException - the xML stream exception
    • writeElement

      public void writeElement(String name, double value) throws XMLStreamException
      Write element converting double value to String.
      Parameters:
      name - the name
      value - the double value
      Throws:
      XMLStreamException - the xML stream exception
    • writeElement

      public void writeElement(String name, boolean value) throws XMLStreamException
      Write element converting boolean value to String.
      Parameters:
      name - the name
      value - the value
      Throws:
      XMLStreamException - the xML stream exception
    • writeAttribute

      public void writeAttribute(String attributeName, String value) throws XMLStreamException
      Write string attribute value.
      Parameters:
      attributeName - the name of the attribute
      value - the attribute value
      Throws:
      XMLStreamException - the xML stream exception
    • writeAttribute

      public void writeAttribute(String attributeName, Boolean value) throws XMLStreamException
      Write boolean attribute value converting it to string.
      Parameters:
      attributeName - the name of the attribute
      value - the attribute value
      Throws:
      XMLStreamException - the xML stream exception
    • writeAttribute

      public void writeAttribute(String attributeName, int value) throws XMLStreamException
      Write int attribute value converting it to string.
      Parameters:
      attributeName - the name of the attribute
      value - the attribute value
      Throws:
      XMLStreamException - the xML stream exception
    • writeAttribute

      public void writeAttribute(String attributeName, Long value) throws XMLStreamException
      Write long attribute value converting it to string.
      Parameters:
      attributeName - the name of the attribute
      value - the attribute value
      Throws:
      XMLStreamException - the xML stream exception
    • writeAttribute

      public void writeAttribute(String attributeName, double value) throws XMLStreamException
      Write double attribute value converting it to string
      Parameters:
      attributeName - the name of the attribute
      value - the attribute value
      Throws:
      XMLStreamException - the xML stream exception