org.jdom
Class CDATA


public class CDATA
implements Cloneable, Serializable

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

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

Constructor Summary
CDATA(String text)
           This creates the CDATA with the supplied text.

Method Summary
 Objectclone()
           This will return a clone of this CDATA.
 final booleanequals(Object ob)
           This tests for equality of this CDATA to the supplied Object.
 final StringgetSerializedForm()
           This will return the CDATA in XML format, usable in an XML document.
 StringgetText()
           This returns the textual data within the CDATA.
 final inthashCode()
           This returns the hash code for this CDATA.
 StringtoString()
           This returns a String representation of the CDATA, suitable for debugging.

Constructor Detail

CDATA

public CDATA(String text)

This creates the CDATA with the supplied text.

Parameters:
text - String content of CDATA.
Method Detail

clone

public Object clone()

This will return a clone of this CDATA.

Returns: Object - clone of this CDATA.

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.

getSerializedForm

public final String getSerializedForm()

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

Returns: String - the serialized form of the CDATA.

getText

public String getText()

This returns the textual data within the CDATA.

Returns: String - text of CDATA.

hashCode

public final int hashCode()

This returns the hash code for this CDATA.

Returns: int - hash code.

toString

public String toString()

This returns a String representation of the CDATA, suitable for debugging. If the XML representation of the CDATA is desired, getSerializedForm() should be used.

Returns: String - information about the Attribute

Association Links

to Class java.lang.String

Text of the CDATA