public class TStreamWritingDefaultHandler
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ext.LexicalHandler
Constructor and Description |
---|
TStreamWritingDefaultHandler(java.io.Writer writer)
Initialzes the handler with the given character output stream..
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Receive notification of character content for a specific element.
|
void |
comment(char[] ch,
int start,
int length)
Report an XML comment anywhere in the document.
|
void |
endCDATA()
Report the end of a CDATA section.
|
void |
endDocument()
Receive notification of the end of the parsed document.
|
void |
endDTD()
Report the end of DTD declarations.
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Receive notification of the ending of an element.
|
void |
endEntity(java.lang.String name)
Report the end of an entity.
|
java.lang.String |
getEncodingAttribute()
Get the encoding string for the XML declaration.
|
java.util.Locale |
getLocale()
Gets the locale.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receive notification of ignorable whitespace within element content.
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification for a processing instruction.
|
void |
setEncodingAttribute(java.lang.String encoding)
Set the encoding string for the XML declaration.
|
void |
setLocale(java.util.Locale locale) |
void |
setRootElement(java.lang.String rootElement)
Sets a new root element tag.
|
void |
setWriter(java.io.Writer writer)
Sets a new character output stream to which events can be written to.
|
void |
startCDATA()
Report the start of a CDATA section.
|
void |
startDocument()
Receive notification for the start of a new document.
|
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Report the start of DTD declarations, if any.
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Receive notification of the beginning of an element.
|
void |
startEntity(java.lang.String name)
Report the beginning of an entity in content.
|
public TStreamWritingDefaultHandler(java.io.Writer writer)
public void setEncodingAttribute(java.lang.String encoding)
encoding
- the enconding string set in the XML declaration.public java.lang.String getEncodingAttribute()
public void setWriter(java.io.Writer writer)
public void setRootElement(java.lang.String rootElement)
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
Copyright (c) 2017 Software AG. All Rights Reserved.