Logo Search packages:      
Sourcecode: jclic version File versions  Download package

Element org::jdom::Element::setText ( String  text  )  [inline]

Sets the content of the element to be the text given. All existing text content and non-text context is removed. If this element should have both textual content and nested elements, use setContent instead. Setting a null text value is equivalent to setting an empty string value.

text new text content for the element
the target element
IllegalDataException if the assigned text contains an illegal character such as a vertical tab (as determined by org.jdom.Verifier#checkCharacterData)

Definition at line 634 of file Element.java.

References addContent(), org::jdom::ContentList::clear(), and content.


        if (text != null) {
            addContent(new Text(text));

        return this;

Generated by  Doxygen 1.6.0   Back to index