public class ToXMLStream extends ToStream
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CDATA_CONTINUE
To insert ]]> in a CDATA section by ending the last CDATA section with
]] and starting the next CDATA section with >
|
static java.lang.String |
CDATA_DELIMITER_CLOSE
The constant "]]>"
|
static java.lang.String |
CDATA_DELIMITER_OPEN |
static java.lang.String |
DEFAULT_SAX_SERIALIZER |
static java.lang.String |
EMPTYSTRING |
static java.lang.String |
ENTITY_AMP |
static java.lang.String |
ENTITY_CRLF |
static java.lang.String |
ENTITY_GT |
static java.lang.String |
ENTITY_LT |
static java.lang.String |
ENTITY_QUOT |
static java.lang.String |
XML_PREFIX |
static java.lang.String |
XMLNS_PREFIX |
static java.lang.String |
XMLNS_URI |
static java.lang.String |
XMLVERSION10 |
static java.lang.String |
XMLVERSION11
Define the XML version.
|
PKG_NAME, PKG_PATHHTML_ATTREMPTY, HTML_ATTRURL, NO_BAD_CHARS| Constructor and Description |
|---|
ToXMLStream()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value,
boolean xslAttribute)
Add an attribute to the current element.
|
void |
addUniqueAttribute(java.lang.String name,
java.lang.String value,
int flags)
This method is used to add an attribute to the currently open element.
|
void |
CopyFrom(ToXMLStream xmlListener)
Copy properties from another SerializerToXML.
|
void |
endDocument()
Receive notification of the end of a document.
|
void |
endElement(java.lang.String elemName)
Receive notification of the end of an element.
|
void |
endPreserving()
Ends a whitespace preserving section.
|
void |
entityReference(java.lang.String name)
Receive notivication of a entityReference.
|
void |
namespaceAfterStartElement(java.lang.String prefix,
java.lang.String uri)
This method is used to notify the serializer of a namespace mapping (or node)
that applies to the current element whose startElement() call has already been seen.
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification of a processing instruction.
|
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).
|
void |
startDocumentInternal()
Receive notification of the beginning of a document.
|
void |
startPreserving()
Starts a whitespace preserving section.
|
addAttributeAlways, addCdataSectionElements, attributeDecl, characters, characters, comment, elementDecl, endCDATA, endDTD, endElement, endNonEscaping, endPrefixMapping, externalEntityDecl, flushPending, getIndentAmount, getOutputFormat, getOutputStream, getWriter, ignorableWhitespace, internalEntityDecl, notationDecl, processAttributes, serialize, setCdataSectionElements, setContentHandler, setDTDEntityExpansion, setEncoding, setEscaping, setIndentAmount, setLineSepUse, setNewLine, setOutputFormat, setOutputStream, setTransformer, setWriter, skippedEntity, startCDATA, startDTD, startElement, startElement, startElement, startEntity, startNonEscaping, startPrefixMapping, startPrefixMapping, unparsedEntityDecl, writeAttrStringaddAttribute, addAttribute, addAttributes, addXSLAttribute, asContentHandler, asDOM3Serializer, asDOMSerializer, characters, close, comment, documentIsEmpty, endEntity, error, fatalError, fireEndEntity, getDoctypePublic, getDoctypeSystem, getEncoding, getIndent, getMediaType, getNamespaceMappings, getNamespaceURI, getNamespaceURIFromPrefix, getOmitXMLDeclaration, getOutputProperty, getOutputPropertyDefault, getOutputPropertyNonDefault, getPrefix, getStandalone, getTransformer, getVersion, setDoctype, setDoctypePublic, setDoctypeSystem, setDocumentLocator, setIndent, setMediaType, setNamespaceMappings, setOmitXMLDeclaration, setOutputProperty, setOutputPropertyDefault, setSourceLocator, setStandalone, setVersion, startDocument, warningpublic static final java.lang.String CDATA_CONTINUE
public static final java.lang.String CDATA_DELIMITER_CLOSE
public static final java.lang.String CDATA_DELIMITER_OPEN
public static final java.lang.String EMPTYSTRING
public static final java.lang.String ENTITY_AMP
public static final java.lang.String ENTITY_CRLF
public static final java.lang.String ENTITY_GT
public static final java.lang.String ENTITY_LT
public static final java.lang.String ENTITY_QUOT
public static final java.lang.String XML_PREFIX
public static final java.lang.String XMLNS_PREFIX
public static final java.lang.String XMLNS_URI
public static final java.lang.String DEFAULT_SAX_SERIALIZER
public static final java.lang.String XMLVERSION11
public static final java.lang.String XMLVERSION10
public void CopyFrom(ToXMLStream xmlListener)
xmlListener - non-null reference to a SerializerToXML object.public void startDocumentInternal()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - Any SAX exception, possibly
wrapping another exception.org.xml.sax.SAXExceptionpublic void endDocument()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - Any SAX exception, possibly
wrapping another exception.org.xml.sax.SAXExceptionpublic void startPreserving()
throws org.xml.sax.SAXException
The contents of the whitespace preserving section will be delivered through the regular characters event.
org.xml.sax.SAXExceptionpublic void endPreserving()
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionstartPreserving()public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
target - The processing instruction target.data - The processing instruction data, or null if
none was supplied.org.xml.sax.SAXException - Any SAX exception, possibly
wrapping another exception.org.xml.sax.SAXExceptionpublic void entityReference(java.lang.String name)
throws org.xml.sax.SAXException
entityReference in interface ExtendedContentHandlerentityReference in class SerializerBasename - The name of the entity.org.xml.sax.SAXExceptionpublic void addUniqueAttribute(java.lang.String name,
java.lang.String value,
int flags)
throws org.xml.sax.SAXException
name - the qualified name of the attributevalue - the value of the attribute which can contain only
ASCII printable characters characters in the range 32 to 127 inclusive.flags - the bit values of this integer give optimization information.org.xml.sax.SAXExceptionpublic void addAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
java.lang.String type,
java.lang.String value,
boolean xslAttribute)
throws org.xml.sax.SAXException
addAttribute in interface ExtendedContentHandleraddAttribute in class SerializerBaseuri - the URI associated with the element namelocalName - local part of the attribute namerawName - prefix:localNametype - value - the value of the attributexslAttribute - true if this attribute is from an xsl:attribute,
false if declared within the elements opening tag.org.xml.sax.SAXExceptionExtendedContentHandler.addAttribute(String, String, String, String, String)public void endElement(java.lang.String elemName)
throws org.xml.sax.SAXException
ToStreamendElement in interface ExtendedContentHandlerendElement in class ToStreamelemName - The element type nameorg.xml.sax.SAXExceptionExtendedContentHandler.endElement(String)public void namespaceAfterStartElement(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
namespaceAfterStartElement in interface ExtendedContentHandlernamespaceAfterStartElement in class SerializerBaseprefix - the URI of the namespaceuri - the prefix associated with the given URI.org.xml.sax.SAXExceptionExtendedContentHandler.namespaceAfterStartElement(String, String)public boolean reset()
reset in interface Serializerreset in class ToStreamCopyright © 2023 Apache XML Project. All Rights Reserved.