Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.xml.serializer.SerializerBase
org.apache.xml.serializer.ToSAXHandler
public abstract class ToSAXHandler
extends SerializerBase
Fields inherited from interface org.apache.xml.serializer.ExtendedContentHandler | |
HTML_ATTREMPTY , HTML_ATTRURL , NO_BAD_CHARS |
Fields inherited from interface org.apache.xml.serializer.SerializerConstants | |
BEGCDATA , CDATA_CONTINUE , CDATA_DELIMITER_CLOSE , CDATA_DELIMITER_OPEN , CNTCDATA , DEFAULT_SAX_SERIALIZER , EMPTYSTRING , ENDCDATA , ENTITY_AMP , ENTITY_CRLF , ENTITY_GT , ENTITY_LT , ENTITY_QUOT , XMLNS_PREFIX , XMLNS_URI , XML_PREFIX |
Constructor Summary | |
| |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
public void addUniqueAttribute(String qName, String value, int flags) throws SAXException
Add a unique attribute
- Specified by:
- addUniqueAttribute in interface ExtendedContentHandler
public void characters(String characters) throws SAXException
Receive notification of character data.
- Specified by:
- characters in interface ExtendedContentHandler
- Parameters:
- Throws:
SAXException
-
public void characters(Node node) throws SAXException
This method gets the node's value as a String and uses that String as if it were an input character notification.
- Specified by:
- characters in interface DOM2DTM.CharacterNodeHandler
- Overrides:
- characters in interface SerializerBase
- Parameters:
node
- the Node to serialize
- Throws:
SAXException
-
public void comment(String comment) throws SAXException
Receive notification of a comment.
- Specified by:
- comment in interface ExtendedLexicalHandler
- Overrides:
- comment in interface SerializerBase
public void error(SAXParseException exc) throws SAXException
- Specified by:
- error in interface ErrorHandler
- Overrides:
- error in interface SerializerBase
public void fatalError(SAXParseException exc) throws SAXException
- Specified by:
- fatalError in interface ErrorHandler
- Overrides:
- fatalError in interface SerializerBase
public void flushPending() throws SAXException
This method flushes any pending events, which can be startDocument() closing the opening tag of an element, or closing an open CDATA section.
- Specified by:
- flushPending in interface SerializationHandler
public void processingInstruction(String target, String data) throws SAXException
Do nothing as this is an abstract class. All subclasses will need to define their behavior if it is different.
- Specified by:
- processingInstruction in interface ContentHandler
public boolean reset()
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).
- Specified by:
- reset in interface Serializer
- Overrides:
- reset in interface SerializerBase
- Returns:
- true if the class was successfuly reset.
- See Also:
Serializer.reset()
public void setCdataSectionElements(Vector URI_and_localNames)
Does nothing. The setting of CDATA section elements has an impact on stream serializers.
- Specified by:
- setCdataSectionElements in interface XSLOutputAttributes
- See Also:
org.apache.xml.serializer.SerializationHandler.setCdataSectionElements(java.util.Vector)
public void setContentHandler(ContentHandler _saxHandler)
Sets the SAX ContentHandler.
- Specified by:
- setContentHandler in interface SerializationHandler
- Parameters:
public void setLexHandler(LexicalHandler _lexHandler)
Sets the LexicalHandler.
- Parameters:
_lexHandler
- The LexicalHandler to set
public void setShouldOutputNSAttr(boolean doOutputNSAttr)
Set whether or not namespace declarations (e.g. xmlns:foo) should appear as attributes of elements
- Parameters:
doOutputNSAttr
- whether or not namespace declarations should appear as attributes
public void setTransformState(TransformStateSetter ts)
Pass in a reference to a TransformState object, which can be used during SAX ContentHandler events to obtain information about he state of the transformation. This method will be called before each startDocument event.
- Parameters:
ts
- A reference to a TransformState object
public void startDTD(String arg0, String arg1, String arg2) throws SAXException
Do nothing.
- Specified by:
- startDTD in interface LexicalHandler
public void startElement(String qName) throws SAXException
An element starts, but attributes are not fully known yet.
- Specified by:
- startElement in interface ExtendedContentHandler
- Parameters:
public void startElement(String uri, String localName, String qName) throws SAXException
Receives notification that an element starts, but attributes are not fully known yet.
- Specified by:
- startElement in interface ExtendedContentHandler
- Parameters:
uri
- the URI of the namespace of the element (optional)localName
- the element name, but without prefix (optional)qName
- the element name, with prefix, if any (required)
public void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException
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.
- Specified by:
- startElement in interface ContentHandler
- Parameters:
- Throws:
SAXException
- Any SAX exception, possibly wrapping another exception.SAXException
-
public void warning(SAXParseException exc) throws SAXException
- Specified by:
- warning in interface ErrorHandler
- Overrides:
- warning in interface SerializerBase