org.eclnt.util.valuemgmt

## Class XMLWriter

- java.lang.Object
- - org.eclnt.util.valuemgmt.XMLWriter

-     public class XMLWriter
      extends java.lang.Object

  Writes an XML content to a writer. There are two modes:
  (1) Passing ComponentDump as null parameter: in this case the output is written into the writer. Just as expected.
  (2) Passing the ComponentDUmp: in this case the output is written into the component dump, which itself maintains a hierarchy of XMLNode objects. Background: the PAGEADDON component at the end sends the XMLNode hierarchy to the XMLWriter. It does certain optimizations hers, e.g. areas in which there is no change of data are only transferred to be "not changed" - without sending all the contained components of the areas.
  It is crucial that writing components in case of using ComponentDump must understand the principle of signalizing changes. Changes are to be registerrd in the following way:
  (a) setting of attributes ==> implicitly the change is registered
  (b) specifying new nodes to be new (c) explicitly calling the writer_writeChangedMarker method. This method e.g. needs to be called if any subcomponents of a components have been removed. See implementation of BaseComponent.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLWriter()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `writer_closeStartAndEndElement(java.io.Writer writer, ComponentDump cd)`
    `static void` | `writer_closeStartElement(java.io.Writer writer, ComponentDump cd)`
    `static void` | `writer_closeStartElementWithoutLineFeed(java.io.Writer writer, ComponentDump cd)`
    `static void` | `writer_endElement(java.io.Writer writer, ComponentDump cd, java.lang.String name)`
    `static void` | `writer_startElement(java.io.Writer writer, ComponentDump cd, java.lang.String name)`
    `static void` | `writer_startElement(java.io.Writer writer, ComponentDump cd, java.lang.String name, boolean isNewNode)`
    `static void` | `writer_writeAttribute(java.io.Writer writer, ComponentDump cd, java.lang.String name, java.lang.Object value)`
    `static void` | `writer_writeAttributeWithFormattedValue(java.io.Writer writer, ComponentDump cd, java.lang.String name, java.lang.Object value)`
    `static void` | `writer_writeChangedMarker(java.io.Writer writer, ComponentDump cd)`
    `static void` | `writer_writeChangedMarkerForChildren(java.io.Writer writer, ComponentDump cd)`
    `static void` | `writer_writeFormattedText(java.io.Writer writer, ComponentDump cd, java.lang.String value)` The text that is passed as value is not updated in any way when getting wirtten into the output stream.
    `static void` | `writer_writePreparedXML(java.io.Writer writer, ComponentDump cd, java.lang.String xml)`
    `static void` | `writer_writeText(java.io.Writer writer, ComponentDump cd, java.lang.String value)`

    - ### 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

    - #### writer_startElement

          public static void writer_startElement(java.io.Writer writer,
                                                 ComponentDump cd,
                                                 java.lang.String name)
                                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_startElement

          public static void writer_startElement(java.io.Writer writer,
                                                 ComponentDump cd,
                                                 java.lang.String name,
                                                 boolean isNewNode)
                                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_closeStartElement

          public static void writer_closeStartElement(java.io.Writer writer,
                                                      ComponentDump cd)
                                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_closeStartElementWithoutLineFeed

          public static void writer_closeStartElementWithoutLineFeed(java.io.Writer writer,
                                                                     ComponentDump cd)
                                                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_closeStartAndEndElement

          public static void writer_closeStartAndEndElement(java.io.Writer writer,
                                                            ComponentDump cd)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_writeAttribute

          public static void writer_writeAttribute(java.io.Writer writer,
                                                   ComponentDump cd,
                                                   java.lang.String name,
                                                   java.lang.Object value)
                                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_writeAttributeWithFormattedValue

          public static void writer_writeAttributeWithFormattedValue(java.io.Writer writer,
                                                                     ComponentDump cd,
                                                                     java.lang.String name,
                                                                     java.lang.Object value)
                                                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_writeText

          public static void writer_writeText(java.io.Writer writer,
                                              ComponentDump cd,
                                              java.lang.String value)
                                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_writeFormattedText

          public static void writer_writeFormattedText(java.io.Writer writer,
                                                       ComponentDump cd,
                                                       java.lang.String value)
                                                throws java.io.IOException

      The text that is passed as value is not updated in any way when getting wirtten into the output stream. Use this text if you pass special sequences, like " ".
      Throws:
        `java.io.IOException`

    - #### writer_writeChangedMarker

          public static void writer_writeChangedMarker(java.io.Writer writer,
                                                       ComponentDump cd)

    - #### writer_writeChangedMarkerForChildren

          public static void writer_writeChangedMarkerForChildren(java.io.Writer writer,
                                                                  ComponentDump cd)

    - #### writer_endElement

          public static void writer_endElement(java.io.Writer writer,
                                               ComponentDump cd,
                                               java.lang.String name)
                                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writer_writePreparedXML

          public static void writer_writePreparedXML(java.io.Writer writer,
                                                     ComponentDump cd,
                                                     java.lang.String xml)
                                              throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © CaptainCasa Gmbh. All Rights Reserved.