Package org.jibx.runtime.impl
Class ISO88591Escaper
- java.lang.Object
-
- org.jibx.runtime.impl.ISO88591Escaper
-
- All Implemented Interfaces:
ICharacterEscaper
public class ISO88591Escaper extends Object implements ICharacterEscaper
Handler for writing ASCII output stream. This code is specifically for XML 1.0 and would require changes for XML 1.1 (to handle the added legal characters, rather than throwing an exception).- Version:
- 1.0
- Author:
- Dennis M. Sosnoski
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ICharacterEscapergetInstance()Get instance of escaper.voidwriteAttribute(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 Detail
-
writeAttribute
public void writeAttribute(String text, Writer writer) throws IOException
Write attribute value with character entity substitutions. This assumes that attributes use the regular quote ('"') delimitor.- Specified by:
writeAttributein interfaceICharacterEscaper- Parameters:
text- attribute value textwriter- sink for output text- Throws:
IOException- on error writing to document
-
writeContent
public void writeContent(String text, Writer writer) throws IOException
Write content value with character entity substitutions.- Specified by:
writeContentin interfaceICharacterEscaper- Parameters:
text- content value textwriter- sink for output text- Throws:
IOException- on error writing to document
-
writeCData
public void writeCData(String text, Writer writer) throws IOException
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.- Specified by:
writeCDatain interfaceICharacterEscaper- Parameters:
text- content value textwriter- sink for output text- Throws:
IOException- on error writing to document
-
getInstance
public static ICharacterEscaper getInstance()
Get instance of escaper.- Returns:
- escaper instance
-
-