CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.xml
Interface DOMOutput

All Known Implementing Classes:
JavaxDOMOutput, NanoXMLDOMOutput

public interface DOMOutput

DOMOutput.

Version:
1.0 10. März 2004 Created.
Author:
Werner Randelshofer

Method Summary
 void addComment(java.lang.String comment)
          Adds a comment to the current element of the DOM Document.
 void addElement(java.lang.String tagName)
          Adds a new element to the DOM Document.
 void addText(java.lang.String text)
          Adds a text to current element of the DOM Document.
 void closeElement()
          Closes the current element of the DOM Document.
 void setAttribute(java.lang.String name, boolean value)
          Adds an attribute to current element of the DOM Document.
 void setAttribute(java.lang.String name, double value)
          Adds an attribute to current element of the DOM Document.
 void setAttribute(java.lang.String name, float value)
          Adds an attribute to current element of the DOM Document.
 void setAttribute(java.lang.String name, int value)
          Adds an attribute to current element of the DOM Document.
 void setAttribute(java.lang.String name, java.lang.String value)
          Adds an attribute to current element of the DOM Document.
 void writeObject(java.lang.Object o)
          Writes an object.
 

Method Detail

addElement

void addElement(java.lang.String tagName)
Adds a new element to the DOM Document. The new element is added as a child to the current element in the DOM document. Then it becomes the current element. The element must be closed using closeElement.


closeElement

void closeElement()
Closes the current element of the DOM Document. The parent of the current element becomes the current element.

Throws:
java.lang.IllegalArgumentException - if the provided tagName does not match the tag name of the element.

addComment

void addComment(java.lang.String comment)
Adds a comment to the current element of the DOM Document.


addText

void addText(java.lang.String text)
Adds a text to current element of the DOM Document. Note: Multiple consecutives texts will be merged.


setAttribute

void setAttribute(java.lang.String name,
                  java.lang.String value)
Adds an attribute to current element of the DOM Document.


setAttribute

void setAttribute(java.lang.String name,
                  int value)
Adds an attribute to current element of the DOM Document.


setAttribute

void setAttribute(java.lang.String name,
                  boolean value)
Adds an attribute to current element of the DOM Document.


setAttribute

void setAttribute(java.lang.String name,
                  float value)
Adds an attribute to current element of the DOM Document.


setAttribute

void setAttribute(java.lang.String name,
                  double value)
Adds an attribute to current element of the DOM Document.


writeObject

void writeObject(java.lang.Object o)
Writes an object.


(c) Werner Randelshofer.
All rights reserved.