public class XhtmlTextConstruct extends TextConstruct
TextConstruct.| Modifier and Type | Class and Description |
|---|---|
class |
XhtmlTextConstruct.AtomHandler
Parses XML in the Atom format.
|
TextConstruct.ChildHandlerInfo, TextConstruct.RssFormat, TextConstruct.Type| Modifier and Type | Field and Description |
|---|---|
protected XmlBlob |
xhtml
XHTML contents.
|
lang| Constructor and Description |
|---|
XhtmlTextConstruct()
Class constructor.
|
XhtmlTextConstruct(XmlBlob xhtml)
Class constructor specifying the XHTML content for this
text construct to contain.
|
XhtmlTextConstruct(XmlBlob xhtml,
java.lang.String lang)
Class constructor specifying the XHTML content for this
text construct to contain, plus the human language that
the text is written in.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateAtom(XmlWriter w,
java.lang.String elementName)
Generates XML in the Atom format.
|
void |
generateRss(XmlWriter w,
java.lang.String elementName,
TextConstruct.RssFormat rssFormat)
Generates XML in the RSS format.
|
java.lang.String |
getPlainText()
Returns a plain-text representation of this text construct.
|
int |
getType()
Returns this text construct's type (text, HTML, or XHTML).
|
XmlBlob |
getXhtml() |
boolean |
isEmpty()
Returns
true if this text construct has no contents. |
void |
setXhtml(XmlBlob v)
Specifies the XHTML contents of this text construct.
|
create, getChildHandler, getLang, html, plainText, setLang, xhtmlprotected XmlBlob xhtml
public XhtmlTextConstruct()
public XhtmlTextConstruct(XmlBlob xhtml)
public XhtmlTextConstruct(XmlBlob xhtml, java.lang.String lang)
public int getType()
TextConstructgetType in interface ITextConstructgetType in class TextConstructpublic boolean isEmpty()
TextConstructtrue if this text construct has no contents.isEmpty in class TextConstructtrue if this text construct has no contentspublic XmlBlob getXhtml()
public void setXhtml(XmlBlob v)
public java.lang.String getPlainText()
TextConstructgetPlainText in interface ITextConstructgetPlainText in class TextConstructnull if there is no text content available.public void generateAtom(XmlWriter w, java.lang.String elementName) throws java.io.IOException
generateAtom in class TextConstructw - output writerelementName - Atom element namejava.io.IOExceptionpublic void generateRss(XmlWriter w, java.lang.String elementName, TextConstruct.RssFormat rssFormat) throws java.io.IOException
generateRss in class TextConstructw - output writerelementName - RSS element namerssFormat - the restrictions on what HTML tags are allowedjava.io.IOException