com.icl.saxon.output
public class XMLEmitter extends Emitter
Field Summary | |
---|---|
char[] | attbuff1
Write attribute name=value pair. |
protected CharacterSet | characterSet |
protected boolean | declarationIsWritten |
boolean | docTypeWritten
Output the document type declaration |
protected boolean | empty |
protected boolean | escaping |
protected String | lastDisplayName |
protected int | lastNameCode |
protected String | lastPrefix |
protected String | lastURI |
protected boolean | openStartTag |
protected boolean | preferHex |
static boolean[] | specialInAtt |
static boolean[] | specialInText |
Method Summary | |
---|---|
void | characters(char[] ch, int start, int length)
Character data. |
protected void | closeStartTag(int nameCode, boolean emptyTag) |
void | comment(char[] ch, int start, int length)
Handle a comment. |
protected String | emptyElementTagCloser(int nameCode)
Close an empty element tag. |
void | endDocument()
End of the document. |
void | endElement(int nameCode)
End of an element. |
protected void | outputCharacterReference(int charval) |
void | processingInstruction(String target, String data)
Handle a processing instruction. |
void | setDocumentLocator(Locator locator)
Set Document Locator. |
void | setEscaping(boolean escaping)
Set escaping on or off |
void | setOutputProperties(Properties details)
Set output properties |
void | setResult(Result result)
Set the result destination |
void | setUnparsedEntity(String name, String uri)
Set the URI for an unparsed entity in the document. |
void | startDocument()
Start of the document. |
void | startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount)
Start of an element. |
protected void | testCharacters(String name)
Test that all characters in a name are supported in the target encoding |
protected boolean | testCharacters(char[] array, int start, int len) |
protected void | writeAttribute(int elCode, String attname, String type, String value) |
void | writeDeclaration()
Output the XML declaration |
protected void | writeDocType(String type, String systemId, String publicId) |
protected void | writeEscape(char[] ch, int start, int length, boolean inAttribute)
Write contents of array to current writer, after escaping special characters |
Parameters: ch The character array containing the string start The start position of the input string within the character array length The length of the input string within the character array This method converts the XML special characters (such as < and &) into their predefined entities.