java.lang.Object | ||
↳ | org.apache.commons.betwixt.strategy.MixedContentEncodingStrategy | |
↳ | org.apache.commons.betwixt.strategy.BaseMixedContentEncodingStrategy |
Basic implementation for MixedContentEncodingStrategy
supports variations of most common use case.
This supports subclasses that choose to encode body content
either as a CDATA
section or by escaping the characters.
Implementations should override encodeAsCDATA(ElementDescriptor)
with an appropriate decision algorithm.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.betwixt.strategy.MixedContentEncodingStrategy
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.betwixt.strategy.MixedContentEncodingStrategy
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Encodes the given body content by either escaping the character data
or by encoding within a
CDATA section. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Should the element described by the given
Usage: subclasses should provide a strategy
to determine whether an element should be encoded using a
| |||||||||||
Wraps the given content into a CDATA section.
| |||||||||||
Escapes a sequence of body content.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.betwixt.strategy.MixedContentEncodingStrategy
| |||||||||||
From class
java.lang.Object
|
Encodes the given body content by either escaping the character data
or by encoding within a CDATA
section.
The algorithm used to decide whether a particular element's mixed
should be escaped is delegated to the concrete subclass through
encodeAsCDATA(ElementDescriptor)
bodyContent | the raw (unescaped) character data, not null |
---|---|
element | the ElementDescriptor describing the element
whose content is being encoded. |
Should the element described by the given
ElementDescriptor
be encoded as a CDATA
section?
Usage: subclasses should provide a strategy
to determine whether an element should be encoded using a
CDATA
section.
element | ElementDescriptor , not null |
---|
CDATA
section
Wraps the given content into a CDATA section.
bodyContent | the content to be encoded into a CDATA section |
---|
Escapes a sequence of body content.
bodyContent | the content whose character data should be escaped, not null |
---|