All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.jdom.CDATA

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

public class CDATA
extends Object
implements Serializable, Cloneable

CDATA defines behavior for an XML CDATA section, modeled in Java. Methods allow the user to obtain the text of the CDATA.

Version:
1.0
Author:
Dan Schaffer, Brett McLaughlin, Jason Hunter

Variable Index

 o text
Text of the CDATA

Constructor Index

 o CDATA()

Default, no-args constructor for implementations to use if needed.

 o CDATA(String)

This creates the CDATA with the supplied text.

Method Index

 o clone()

This will return a clone of this CDATA.

 o equals(Object)

This tests for equality of this CDATA to the supplied Object.

 o getSerializedForm()

This will return the CDATA in XML format, usable in an XML document. Deprecated.

 o getText()

This returns the textual data within the CDATA.

 o hashCode()

This returns the hash code for this CDATA.

 o toString()

This returns a String representation of the CDATA, suitable for debugging.

Variables

 o text
 protected String text
Text of the CDATA

Constructors

 o CDATA
 protected CDATA()

Default, no-args constructor for implementations to use if needed.

 o CDATA
 public CDATA(String text)

This creates the CDATA with the supplied text.

Parameters:
text - String content of CDATA.
Throws: IllegalDataException
if the given text string is invalid in a CDATA section.

Methods

 o getText
 public String getText()

This returns the textual data within the CDATA.

Returns:
String - text of CDATA.
 o toString
 public String toString()

This returns a String representation of the CDATA, suitable for debugging. If the XML representation of the CDATA is desired, {@link org.jdom.output.XMLOutputter#outputString(CDATA)} should be used.

Returns:
String - information about the Attribute
Overrides:
toString in class Object
 o equals
 public final boolean equals(Object ob)

This tests for equality of this CDATA to the supplied Object.

Parameters:
ob - Object to compare to.
Returns:
boolean - whether the Comment is equal to the supplied Object.
Overrides:
equals in class Object
 o hashCode
 public final int hashCode()

This returns the hash code for this CDATA.

Returns:
int - hash code.
Overrides:
hashCode in class Object
 o clone
 public Object clone()

This will return a clone of this CDATA.

Returns:
Object - clone of this CDATA.
Overrides:
clone in class Object
 o getSerializedForm
 public final String getSerializedForm()
Note: getSerializedForm() is deprecated. Deprecated in Beta7, use XMLOutputter.outputString(CDATA) instead

This will return the CDATA in XML format, usable in an XML document.

Returns:
String - the serialized form of the CDATA.

All Packages  Class Hierarchy  This Package  Previous  Next  Index