ToXMLSAXHandler.public final class ToTextSAXHandler extends ToSAXHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
CDATA_CONTINUE
To insert ]]> in a CDATA section by ending the last CDATA section with
]] and starting the next CDATA section with >
|
static String |
CDATA_DELIMITER_CLOSE
The constant "]]>"
|
static String |
CDATA_DELIMITER_OPEN |
static String |
DEFAULT_SAX_SERIALIZER |
static String |
EMPTYSTRING |
static String |
ENTITY_AMP |
static String |
ENTITY_CRLF |
static String |
ENTITY_GT |
static String |
ENTITY_LT |
static String |
ENTITY_QUOT |
static String |
XML_PREFIX |
static String |
XMLNS_PREFIX |
static String |
XMLNS_URI |
static String |
XMLVERSION10 |
static String |
XMLVERSION11
Define the XML version.
|
log, m_lexHandler, m_saxHandler, m_statem_attrBuff, m_attributes, m_CdataElems, m_cdataTagOpen, m_charsBuff, m_doctypePublic, m_doctypeSystem, m_doIndent, m_elemContext, m_indentAmount, m_inEntityRef, m_inExternalDTD, m_mediatype, m_needToCallStartDocument, m_prefixMap, m_shouldNotWriteXMLHeader, m_sourceLocator, m_standaloneWasSpecified, m_StringOfCDATASections, m_tracer, m_version, m_writer, PKG_NAME, PKG_PATH| Constructor and Description |
|---|
ToTextSAXHandler(ContentHandler hdlr,
LexicalHandler lex,
String encoding)
Deprecated.
|
ToTextSAXHandler(ContentHandler handler,
String encoding)
Deprecated.
From XSLTC
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value)
Deprecated.
From XSLTC
|
void |
addAttribute(String uri,
String localName,
String rawName,
String type,
String value,
boolean XSLAttribute)
Deprecated.
Adds the given attribute to the set of collected attributes , but only if
there is a currently open element.
|
void |
attributeDecl(String arg0,
String arg1,
String arg2,
String arg3,
String arg4)
Deprecated.
|
void |
characters(char[] characters,
int offset,
int length)
Deprecated.
|
void |
characters(String characters)
Deprecated.
Receive notification of character data.
|
void |
comment(char[] ch,
int start,
int length)
Deprecated.
|
void |
comment(String data)
Deprecated.
Receive notification of a comment.
|
void |
elementDecl(String arg0,
String arg1)
Deprecated.
|
void |
endCDATA()
Deprecated.
|
void |
endDocument()
Deprecated.
From XSLTC
|
void |
endDTD()
Deprecated.
|
void |
endElement(String elemName)
Deprecated.
From XSLTC
|
void |
endElement(String arg0,
String arg1,
String arg2)
Deprecated.
|
void |
endPrefixMapping(String arg0)
Deprecated.
|
void |
externalEntityDecl(String arg0,
String arg1,
String arg2)
Deprecated.
|
Properties |
getOutputFormat()
Deprecated.
|
OutputStream |
getOutputStream()
Deprecated.
|
Writer |
getWriter()
Deprecated.
|
void |
ignorableWhitespace(char[] arg0,
int arg1,
int arg2)
Deprecated.
|
void |
indent(int n)
Deprecated.
Does nothing because
the indent attribute is ignored for text output.
|
void |
internalEntityDecl(String arg0,
String arg1)
Deprecated.
|
void |
namespaceAfterStartElement(String prefix,
String uri)
Deprecated.
This method is used when a prefix/uri namespace mapping
is indicated after the element was started with a
startElement() and before and endElement().
|
void |
processingInstruction(String arg0,
String arg1)
Deprecated.
From XSLTC
|
boolean |
reset()
Deprecated.
Try's to reset the super class and reset this class for
re-use, so that you don't need to create a new serializer
(mostly for performance reasons).
|
void |
serialize(Node node)
Deprecated.
|
void |
setDocumentLocator(Locator arg0)
Deprecated.
Receive an object for locating the origin of SAX document events.
|
boolean |
setEscaping(boolean escape)
Deprecated.
|
void |
setIndent(boolean indent)
Deprecated.
Sets the value coming from the xsl:output indent stylesheet
attribute.
|
void |
setOutputFormat(Properties format)
Deprecated.
|
void |
setOutputStream(OutputStream output)
Deprecated.
|
void |
setWriter(Writer writer)
Deprecated.
|
void |
skippedEntity(String arg0)
Deprecated.
|
void |
startCDATA()
Deprecated.
|
void |
startElement(String elementName)
Deprecated.
An element starts, but attributes are not fully known yet.
|
void |
startElement(String elementNamespaceURI,
String elementLocalName,
String elementName)
Deprecated.
From XSLTC
|
void |
startElement(String arg0,
String arg1,
String arg2,
Attributes arg3)
Deprecated.
Receive notification of the beginning of an element, although this is a
SAX method additional namespace or attribute information can occur before
or after this call, that is associated with this element.
|
void |
startEntity(String arg0)
Deprecated.
|
void |
startPrefixMapping(String prefix,
String uri)
Deprecated.
|
boolean |
startPrefixMapping(String prefix,
String uri,
boolean shouldFlush)
Deprecated.
|
addUniqueAttribute, characters, closeCDATA, closeStartTag, error, fatalError, flushPending, setCdataSectionElements, setContentHandler, setLexHandler, setShouldOutputNSAttr, setTransformState, startDocumentInternal, startDTD, warningaddAttribute, addAttributeAlways, addAttributes, addXSLAttribute, asContentHandler, asDOM3Serializer, asDOMSerializer, close, documentIsEmpty, endEntity, entityReference, fireCDATAEvent, fireCharEvent, fireCommentEvent, fireEndDoc, fireEndElem, fireEndEntity, fireEntityReference, fireEscapingEvent, fireStartDoc, fireStartElem, fireStartEntity, getDoctypePublic, getDoctypeSystem, getEncoding, getIndent, getIndentAmount, getLocalName, getMediaType, getNamespaceMappings, getNamespaceURI, getNamespaceURIFromPrefix, getOmitXMLDeclaration, getOutputProperty, getOutputPropertyDefault, getOutputPropertyNonDefault, getPrefix, getPrefixPart, getStandalone, getTransformer, getVersion, initCDATA, isCdataSection, notationDecl, patchName, setDoctype, setDoctypePublic, setDoctypeSystem, setDTDEntityExpansion, setEncoding, setIndentAmount, setMediaType, setNamespaceMappings, setOmitXMLDeclaration, setOutputProperty, setOutputPropertyDefault, setSourceLocator, setStandalone, setStandaloneInternal, setTransformer, setVersion, startDocument, unparsedEntityDeclpublic static final String CDATA_CONTINUE
public static final String CDATA_DELIMITER_CLOSE
public static final String CDATA_DELIMITER_OPEN
public static final String EMPTYSTRING
public static final String ENTITY_AMP
public static final String ENTITY_CRLF
public static final String ENTITY_GT
public static final String ENTITY_LT
public static final String ENTITY_QUOT
public static final String XML_PREFIX
public static final String XMLNS_PREFIX
public static final String XMLNS_URI
public static final String DEFAULT_SAX_SERIALIZER
public static final String XMLVERSION11
public static final String XMLVERSION10
public ToTextSAXHandler(ContentHandler hdlr, LexicalHandler lex, String encoding)
public ToTextSAXHandler(ContentHandler handler, String encoding)
public void endElement(String elemName) throws SAXException
SAXExceptionExtendedContentHandler#endElement(String)public void endElement(String arg0, String arg1, String arg2) throws SAXException
SAXExceptionContentHandler.endElement(String, String, String)public void comment(char[] ch,
int start,
int length)
throws SAXException
SAXExceptionpublic void comment(String data) throws SAXException
ToSAXHandlercomment in interface org.apache.xml.serializer.ExtendedLexicalHandlercomment in class ToSAXHandlerSAXExceptionExtendedLexicalHandler.comment(String)public Properties getOutputFormat()
Serializer#getOutputFormat()public OutputStream getOutputStream()
Serializer#getOutputStream()public Writer getWriter()
Serializer#getWriter()public void indent(int n)
throws SAXException
SAXExceptionpublic boolean reset()
ToSAXHandlerreset in interface org.apache.xml.serializer.Serializerreset in class ToSAXHandlerSerializer#reset()public void serialize(Node node) throws IOException
IOExceptionDOMSerializer#serialize(Node)public boolean setEscaping(boolean escape)
SerializationHandler#setEscaping(boolean)public void setIndent(boolean indent)
SerializerBasesetIndent in class SerializerBaseindent - true if the output document should be indented to
visually indicate its structure.SerializationHandler#setIndent(boolean)public void setOutputFormat(Properties format)
Serializer#setOutputFormat(Properties)public void setOutputStream(OutputStream output)
Serializer#setOutputStream(OutputStream)public void setWriter(Writer writer)
Serializer#setWriter(Writer)public void addAttribute(String uri, String localName, String rawName, String type, String value, boolean XSLAttribute)
SerializerBaseaddAttribute in interface org.apache.xml.serializer.ExtendedContentHandleraddAttribute in class SerializerBaseuri - the URI of the attributelocalName - the local name of the attributerawName - the qualified name of the attributetype - the type of the attribute (probably CDATA)value - the value of the attributeXSLAttribute - true if this attribute is coming from an xsl:attriute elementExtendedContentHandler#addAttribute(String, String, String, String, String)public void attributeDecl(String arg0, String arg1, String arg2, String arg3, String arg4) throws SAXException
public void elementDecl(String arg0, String arg1) throws SAXException
SAXExceptionDeclHandler.elementDecl(String, String)public void externalEntityDecl(String arg0, String arg1, String arg2) throws SAXException
SAXExceptionDeclHandler.externalEntityDecl(String, String, String)public void internalEntityDecl(String arg0, String arg1) throws SAXException
SAXExceptionDeclHandler.internalEntityDecl(String, String)public void endPrefixMapping(String arg0) throws SAXException
SAXExceptionContentHandler.endPrefixMapping(String)public void ignorableWhitespace(char[] arg0,
int arg1,
int arg2)
throws SAXException
SAXExceptionContentHandler.ignorableWhitespace(char[], int, int)public void processingInstruction(String arg0, String arg1) throws SAXException
processingInstruction in interface ContentHandlerprocessingInstruction in class ToSAXHandlerSAXExceptionContentHandler.processingInstruction(String, String)public void setDocumentLocator(Locator arg0)
SerializerBasesetDocumentLocator in interface ContentHandlersetDocumentLocator in class SerializerBasearg0 - An object that can return the location of any SAX document
event.
Receive an object for locating the origin of SAX document events.
SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface.
The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.
Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time.
ContentHandler.setDocumentLocator(Locator)public void skippedEntity(String arg0) throws SAXException
SAXExceptionContentHandler.skippedEntity(String)public void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException
ToSAXHandlerstartElement in interface ContentHandlerstartElement in class ToSAXHandlerSAXExceptionContentHandler.startElement(String, String, String, Attributes)public void endCDATA()
throws SAXException
SAXExceptionLexicalHandler.endCDATA()public void endDTD()
throws SAXException
SAXExceptionLexicalHandler.endDTD()public void startCDATA()
throws SAXException
SAXExceptionLexicalHandler.startCDATA()public void startEntity(String arg0) throws SAXException
SAXExceptionLexicalHandler.startEntity(String)public void startElement(String elementNamespaceURI, String elementLocalName, String elementName) throws SAXException
startElement in interface org.apache.xml.serializer.ExtendedContentHandlerstartElement in class ToSAXHandlerelementNamespaceURI - the URI of the namespace of the element (optional)elementLocalName - the element name, but without prefix (optional)elementName - the element name, with prefix, if any (required)SAXExceptionExtendedContentHandler#startElement(String)public void startElement(String elementName) throws SAXException
ToSAXHandlerstartElement in interface org.apache.xml.serializer.ExtendedContentHandlerstartElement in class ToSAXHandlerelementName - the element name, with prefix (if any).SAXExceptionExtendedContentHandler#startElement(String)public void endDocument()
throws SAXException
SAXExceptionContentHandler.endDocument()public void characters(String characters) throws SAXException
ToSAXHandlercharacters in interface org.apache.xml.serializer.ExtendedContentHandlercharacters in class ToSAXHandlercharacters - The string of characters to process.SAXExceptionExtendedContentHandler#characters(String)public void characters(char[] characters,
int offset,
int length)
throws SAXException
SAXExceptionContentHandler.characters(char[], int, int)public void addAttribute(String name, String value)
addAttribute in interface org.apache.xml.serializer.ExtendedContentHandleraddAttribute in class SerializerBasename - the attribute's qualified namevalue - the value of the attributepublic boolean startPrefixMapping(String prefix, String uri, boolean shouldFlush) throws SAXException
SAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
SAXExceptionpublic void namespaceAfterStartElement(String prefix, String uri) throws SAXException
SerializerBasenamespaceAfterStartElement in interface org.apache.xml.serializer.ExtendedContentHandlernamespaceAfterStartElement in class SerializerBaseprefix - the URI of the namespaceuri - the prefix associated with the given URI.SAXExceptionExtendedContentHandler#namespaceAfterStartElement(String, String)Copyright © 2007-2018. All Rights Reserved.