org.xpresso.xml
Class Text

java.lang.Object
  extended by org.xpresso.xml.XmlContent
      extended by org.xpresso.xml.Text
All Implemented Interfaces:
java.io.Serializable

public class Text
extends XmlContent

The classe Text is used to add text to the XML document.

This code is under the LGPL v3 licence.

Author:
Alexis Dufrenoy
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xpresso.xml.XmlContent
content
 
Constructor Summary
protected Text(java.lang.String text)
          Constructs a Text block with the given String.
 
Method Summary
static boolean isValid(java.lang.String content)
          Check if the content given in parameter is valid to be used in a Text block.
 
Methods inherited from class org.xpresso.xml.XmlContent
getText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text

protected Text(java.lang.String text)
        throws IllegalContentException
Constructs a Text block with the given String.

Parameters:
text - The content of the block
Throws:
IllegalContentException - Thrown if the given String contains the sequence "]]>"
Method Detail

isValid

public static boolean isValid(java.lang.String content)
Check if the content given in parameter is valid to be used in a Text block.

Parameters:
content - The content to be checked
Returns:
false if the given String contains a "&" outside an entity or a "<", true if not