Interface RawContent

All Known Implementing Classes:
RawText

public interface RawContent
Marker interface for objects whose toString() value should be emitted verbatim as raw element content by the XML and HTML serializers.

This is the re-serializable analogue of the raw Reader/InputStream path: the value is appended as-is (no XML entity escaping, no _x####_ whitespace/invalid-char encoding, no wrapping element), but because it is backed by a reusable value (typically a String) it survives repeated serialization — unlike a one-shot Reader which is consumed on first use.

Implementations are responsible for producing content that is safe for the target syntax. Notably, because Juneau parses via a StAX XMLStreamReader, content containing a raw '<' or a bare '&' will serialize correctly (browser-safe) but will NOT round-trip back through Juneau's parser.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the raw, verbatim character content to emit.
  • Method Details

    • toString

      Returns the raw, verbatim character content to emit.
      Overrides:
      toString in class Object
      Returns:
      The raw content. May be null (nothing is emitted).