text
.
null
or empty
@return the localized text
For example, given HTML {@code
Hello there now!
}, {@code p.text()} returns {@code "Hello there now!"} @return unencoded text, or empty string if none. @see #ownText()Note that it is possible to get repeats if the matched elements contain both parent elements and their own children, as the Element.text() method returns the combined text of a parent and all its children. @return string of all text: unescaped and no HTML. @see Element#text()
null
or empty
@return the localized text
This method can be called (i) after the startAttribute method and (ii) before the endAttribute method, to marshal attribute values. If the method is called more than once, those texts are considered as separated by whitespaces. For example,
c.startAttribute(); c.text("abc"); c.text("def"); c.endAttribute("","foo");will generate foo="abc def".
Similarly, this method can be called after the endAttributes method to marshal texts inside elements. The same rule about multiple invokations apply to this case, too. For example,
c.startElement("","foo"); c.endNamespaceDecls(); c.endAttributes(); c.text("abc"); c.text("def"); c.startElement("","bar"); c.endAttributes(); c.endElement(); c.text("ghi"); c.endElement();will generate
<foo>abc def<bar/>ghi</foo>
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|