Package org.jibx.runtime
Interface ICharacterEscaper
- All Known Implementing Classes:
ISO88591Escaper,USASCIIEscaper,UTF8Escaper
public interface ICharacterEscaper
Escaper for character data to be written to output document. This allows
special character encodings to be handled appropriately on output. It's used
by the generic output handler class during document marshalling.
- Version:
- 1.0
- Author:
- Dennis M. Sosnoski
-
Method Summary
Modifier and TypeMethodDescriptionvoidwriteAttribute(String text, Writer writer) Write attribute value with character entity substitutions.voidwriteCData(String text, Writer writer) Write CDATA to document.voidwriteContent(String text, Writer writer) Write content value with character entity substitutions.
-
Method Details
-
writeAttribute
Write attribute value with character entity substitutions. This assumes that attributes use the regular quote ('"') delimitor.- Parameters:
text- attribute value textwriter- sink for output text- Throws:
IOException- on error writing to document
-
writeContent
Write content value with character entity substitutions.- Parameters:
text- content value textwriter- sink for output text- Throws:
IOException- on error writing to document
-
writeCData
Write CDATA to document. This writes the beginning and ending sequences for a CDATA section as well as the actual text, verifying that only characters allowed by the encoding are included in the text.- Parameters:
text- content value textwriter- sink for output text- Throws:
IOException- on error writing to document
-