public abstract class AbstractTextElement extends AbstractExtension
Constructor and Description |
---|
AbstractTextElement() |
Modifier and Type | Method and Description |
---|---|
TextConstruct |
getContent() |
XmlParser.ElementHandler |
getHandler(ExtensionProfile extProfile,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
The default implementation uses the
AttributesHandler to handle
parsing the extension. |
java.lang.String |
getPlainTextContent() |
boolean |
isEmpty() |
void |
putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
|
void |
setHtmlContent(java.lang.String html) |
void |
setPlainTextContent(java.lang.String text) |
disableStrictValidation, enableStrictValidation, generate, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable
public boolean isEmpty()
public TextConstruct getContent()
public void setHtmlContent(java.lang.String html)
public void setPlainTextContent(java.lang.String text)
public java.lang.String getPlainTextContent()
public void putAttributes(AttributeGenerator generator)
AbstractExtension
AbstractExtension.generate(XmlWriter,ExtensionProfile)
. Default implementation
does nothing, though generally this is discouraged unless there really are
no attributes.generator
- attribute generatorpublic final XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs) throws ParseException
AbstractExtension
AttributesHandler
to handle
parsing the extension.getHandler
in interface Extension
getHandler
in class AbstractExtension
extProfile
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributesParseException
- when an unexpected tag or badly-formatted
XML is detected