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

## org.jdom
Class CDATA

    java.lang.Object
      |
      +--org.jdom.Content
            |
            +--org.jdom.Text
                  |
                  +--org.jdom.CDATA

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

public class CDATA
extends Text

An XML CDATA section. Represents character-based content within an XML document that should be output within special CDATA tags. Semantically it's identical to a simple `Text` object, but output behavior is different. CDATA makes no guarantees about the underlying textual representation of character data, but does expose that data as a Java String.

Version:
  $Revision: 1.29 $, $Date: 2004/02/06 09:28:30 $
Author:
  Dan Schaffer, Brett McLaughlin, Jason Hunter, Bradley S. Huffman
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.jdom.Text
`value`

Fields inherited from class org.jdom.Content
`parent`

Constructor Summary
`protected` | `CDATA()` This is the protected, no-args constructor standard in all JDOM classes.
`` | `CDATA(java.lang.String str)` This constructor creates a new `CDATA` node, with the supplied string value as it's character content.

Method Summary
`void` | `append(java.lang.String str)` This will append character content to whatever content already exists within this `CDATA` node.
`Text` | `setText(java.lang.String str)` This will set the value of this `CDATA` node.
`java.lang.String` | `toString()` This returns a `String` representation of the `CDATA` node, suitable for debugging.

Methods inherited from class org.jdom.Text
`append, clone, getText, getTextNormalize, getTextTrim, getValue, normalizeString`

Methods inherited from class org.jdom.Content
`detach, equals, getDocument, getParent, hashCode, setParent`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CDATA

    protected CDATA()

  This is the protected, no-args constructor standard in all JDOM classes. It allows subclassers to get a raw instance with no initialization.

### CDATA

    public CDATA(java.lang.String str)

  This constructor creates a new `CDATA` node, with the supplied string value as it's character content.

Parameters:
  `str` - the node's character content.
Throws:
  `IllegalDataException` - if `str` contains an illegal character such as a vertical tab (as determined by `Verifier.checkCharacterData(java.lang.String)`) or the CDATA end delimiter `]]>`.

Method Detail

### setText

    public Text setText(java.lang.String str)

  This will set the value of this `CDATA` node.

  Overrides:
    `setText` in class `Text`
  Parameters:
    `str` - value for node's content.
  Throws:
    `IllegalDataException` - if `str` contains an illegal character such as a vertical tab (as determined by `Verifier.checkCharacterData(java.lang.String)`) or the CDATA end delimiter `]]>`.

### append

    public void append(java.lang.String str)

  This will append character content to whatever content already exists within this `CDATA` node.

  Overrides:
    `append` in class `Text`
  Parameters:
    `str` - character content to append.
  Throws:
    `IllegalDataException` - if `str` contains an illegal character such as a vertical tab (as determined by `Verifier.checkCharacterData(java.lang.String)`) or the CDATA end delimiter `]]>`.

### toString

    public java.lang.String toString()

  This returns a `String` representation of the `CDATA` node, suitable for debugging. If the XML representation of the `CDATA` node is desired, either ``Text.getText()`` or `XMLOutputter.output(CDATA, java.io.Writer)` should be used.

  Overrides:
    `toString` in class `Text`
  Returns:
    `String` - information about this node.

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

Copyright © 2004 Jason Hunter, Brett McLaughlin. All Rights Reserved.