SAXWriter writes a DOM4J tree to a SAX ContentHandler.
| Modifier and Type | Field and Description |
|---|---|
| private AttributesImpl | attributes
|
| private ContentHandler | contentHandler
|
| private boolean | declareNamespaceAttributes
Whether namespace declarations are exported as attributes or not |
| private DTDHandler | dtdHandler
|
| private EntityResolver | entityResolver
|
| private ErrorHandler | |
| protected static final String | |
| protected static final String | |
| private Map | features
Stores the features |
| protected static final String[] | |
| private LexicalHandler | lexicalHandler
|
| private Map | properties
Stores the properties |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | SAXWriter(ContentHandler contentHandler, LexicalHandler lexicalHandler, EntityResolver entityResolver)
|
| Modifier and Type | Method and Description |
|---|---|
| protected AttributesImpl | Returns: DOCUMENT ME!DOCUMENT ME! attrs, Namespace DOCUMENT ME! namespace)If isDelcareNamespaceAttributes() is enabled then this method will add the given namespace declaration to the supplied attributes object, creating one if it does not exist. |
| protected void | |
| protected Attributes | |
| protected void | documentLocator(Document
DOCUMENT ME! document)The |
| protected void | dtdHandler(Document
DOCUMENT ME! document)We do not yet support DTD or XML Schemas so this method does nothing right now. |
| protected void | |
| protected void | |
| protected void | endPrefixMapping(NamespaceStack
DOCUMENT ME! stack, int DOCUMENT ME! stackSize)Fires a SAX endPrefixMapping event for all the namespaceStack which have gone out of scope |
| protected void | |
| public ContentHandler | Returns: theContentHandler called when SAX events are
raisedImplements org. |
| public DTDHandler | |
| public EntityResolver | Returns: theEntityResolver used when a Document contains a
DTDImplements org. |
| public ErrorHandler | Returns: theErrorHandlerImplements org. |
| public boolean | Returns: DOCUMENT ME!DOCUMENT ME! name)Implements org. |
| public LexicalHandler | |
| public Object | Returns: DOCUMENT ME!DOCUMENT ME! name)Implements org. |
| public boolean | Returns: DOCUMENT ME!Should namespace declarations be converted to "xmlns" attributes. |
| protected boolean | Returns: true if the given namespace is an ignorable namespace (such as Namespace.NO_NAMESPACE or Namespace.XML_NAMESPACE) or if the namespace has already been declared in the current scopeDOCUMENT ME! namespace, NamespaceStack DOCUMENT ME! namespaceStack)DOCUMENT ME! |
| public void | parse(String
DOCUMENT ME! systemId)Implements org. |
| public void | |
| public void | setContentHandler(ContentHandler
is the contentHandler)ContentHandler called when SAX events
are raisedImplements org. ContentHandler called when SAX events are raised
|
| public void | setDeclareNamespaceAttributes(boolean
DOCUMENT ME! declareNamespaceAttrs)Sets whether namespace declarations should be exported as "xmlns" attributes or not. |
| public void | setDTDHandler(DTDHandler
DOCUMENT ME! handler)Implements org. DTDHandler.
|
| public void | setEntityResolver(EntityResolver
is the entityResolver)EntityResolverImplements org. EntityResolver.
|
| public void | setErrorHandler(ErrorHandler
DOCUMENT ME! errorHandler)Implements org. ErrorHandler.
|
| public void | setFeature(String
DOCUMENT ME! name, boolean DOCUMENT ME! value)Implements org. |
| public void | |
| public void | setProperty(String
DOCUMENT ME! name, Object DOCUMENT ME! value)Implements org. |
| public void | |
| protected void | |
| protected void | |
| protected AttributesImpl | Returns: DOCUMENT ME!DOCUMENT ME! element, NamespaceStack DOCUMENT ME! namespaceStack)Fires a SAX startPrefixMapping event for all the namespaceStack which have just come into scope |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | write(ProcessingInstruction
is the ProcessingInstruction to parse pi)Generates SAX events for the given ProcessingInstruction |
| protected void | |
| public void | |
| protected void | |
| public void |
| attributes | back to summary |
|---|---|
| private AttributesImpl attributes
| |
| contentHandler | back to summary |
|---|---|
| private ContentHandler contentHandler
| |
| declareNamespaceAttributes | back to summary |
|---|---|
| private boolean declareNamespaceAttributes Whether namespace declarations are exported as attributes or not | |
| dtdHandler | back to summary |
|---|---|
| private DTDHandler dtdHandler
| |
| entityResolver | back to summary |
|---|---|
| private EntityResolver entityResolver
| |
| errorHandler | back to summary |
|---|---|
| private ErrorHandler errorHandler | |
| FEATURE_NAMESPACE_PREFIXES | back to summary |
|---|---|
| protected static final String FEATURE_NAMESPACE_PREFIXES | |
| FEATURE_NAMESPACES | back to summary |
|---|---|
| protected static final String FEATURE_NAMESPACES | |
| features | back to summary |
|---|---|
| private Map<String, Boolean> features Stores the features | |
| LEXICAL_HANDLER_NAMES | back to summary |
|---|---|
| protected static final String[] LEXICAL_HANDLER_NAMES | |
| lexicalHandler | back to summary |
|---|---|
| private LexicalHandler lexicalHandler
| |
| properties | back to summary |
|---|---|
| private Map<String, Object> properties Stores the properties | |
| SAXWriter | back to summary |
|---|---|
| public SAXWriter() | |
| SAXWriter | back to summary |
|---|---|
| public SAXWriter(ContentHandler contentHandler) | |
| SAXWriter | back to summary |
|---|---|
| public SAXWriter(ContentHandler contentHandler, LexicalHandler lexicalHandler) | |
| SAXWriter | back to summary |
|---|---|
| public SAXWriter(ContentHandler contentHandler, LexicalHandler lexicalHandler, EntityResolver entityResolver) | |
| addNamespaceAttribute | back to summary |
|---|---|
| protected AttributesImpl addNamespaceAttribute(AttributesImpl attrs, Namespace namespace) If isDelcareNamespaceAttributes() is enabled then this method will add the given namespace declaration to the supplied attributes object, creating one if it does not exist.
| |
| checkForNullHandlers | back to summary |
|---|---|
| protected void checkForNullHandlers() Ensures non-null content handlers? | |
| createAttributes | back to summary |
|---|---|
| protected Attributes createAttributes(Element element, Attributes namespaceAttributes) throws SAXException | |
| documentLocator | back to summary |
|---|---|
| protected void documentLocator(Document document) throws SAXException The
| |
| dtdHandler | back to summary |
|---|---|
| protected void dtdHandler(Document document) throws SAXException We do not yet support DTD or XML Schemas so this method does nothing right now.
| |
| endDocument | back to summary |
|---|---|
| protected void endDocument() throws SAXException | |
| endElement | back to summary |
|---|---|
| protected void endElement(Element element) throws SAXException | |
| endPrefixMapping | back to summary |
|---|---|
| protected void endPrefixMapping(NamespaceStack stack, int stackSize) throws SAXException Fires a SAX endPrefixMapping event for all the namespaceStack which have gone out of scope
| |
| entityResolver | back to summary |
|---|---|
| protected void entityResolver(Document document) throws SAXException | |
| getContentHandler | back to summary |
|---|---|
| public ContentHandler getContentHandler() Implements org. DOCUMENT ME!
| |
| getDTDHandler | back to summary |
|---|---|
| public DTDHandler getDTDHandler() Implements org. DOCUMENT ME!
| |
| getEntityResolver | back to summary |
|---|---|
| public EntityResolver getEntityResolver() Implements org. DOCUMENT ME!
| |
| getErrorHandler | back to summary |
|---|---|
| public ErrorHandler getErrorHandler() Implements org. DOCUMENT ME!
| |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException Implements org. Looks up the value of a feature.
| |
| getLexicalHandler | back to summary |
|---|---|
| public LexicalHandler getLexicalHandler() DOCUMENT ME!
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException Implements org. Gets the given SAX property
| |
| isDeclareNamespaceAttributes | back to summary |
|---|---|
| public boolean isDeclareNamespaceAttributes() Should namespace declarations be converted to "xmlns" attributes. This
property defaults to
| |
| isIgnoreableNamespace | back to summary |
|---|---|
| protected boolean isIgnoreableNamespace(Namespace namespace, NamespaceStack namespaceStack) DOCUMENT ME!
| |
| parse | back to summary |
|---|---|
| public void parse(String systemId) throws SAXNotSupportedException Implements org. This method is not supported.
| |
| parse | back to summary |
|---|---|
| public void parse(InputSource input) throws SAXException Implements org. Parses an XML document. This method can only accept DocumentInputSource
inputs otherwise a
| |
| setContentHandler | back to summary |
|---|---|
| public void setContentHandler(ContentHandler contentHandler) Implements org. Sets the
| |
| setDeclareNamespaceAttributes | back to summary |
|---|---|
| public void setDeclareNamespaceAttributes(boolean declareNamespaceAttrs) Sets whether namespace declarations should be exported as "xmlns" attributes or not. This property is set from the SAX feature "http://xml.org/sax/features/namespace-prefixes"
| |
| setDTDHandler | back to summary |
|---|---|
| public void setDTDHandler(DTDHandler handler) Implements org. Sets the
| |
| setEntityResolver | back to summary |
|---|---|
| public void setEntityResolver(EntityResolver entityResolver) Implements org. Sets the
| |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler errorHandler) Implements org. Sets the
| |
| setFeature | back to summary |
|---|---|
| public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException Implements org. This implementation does actually use any features but just stores them for later retrieval
| |
| setLexicalHandler | back to summary |
|---|---|
| public void setLexicalHandler(LexicalHandler lexicalHandler) Sets the
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object value) Implements org. Sets the given SAX property | |
| setXMLReader | back to summary |
|---|---|
| public void setXMLReader(XMLReader xmlReader) Sets the
| |
| startDocument | back to summary |
|---|---|
| protected void startDocument() throws SAXException | |
| startElement | back to summary |
|---|---|
| protected void startElement(Element element, AttributesImpl namespaceAttributes) throws SAXException | |
| startPrefixMapping | back to summary |
|---|---|
| protected AttributesImpl startPrefixMapping(Element element, NamespaceStack namespaceStack) throws SAXException Fires a SAX startPrefixMapping event for all the namespaceStack which have just come into scope
| |
| write | back to summary |
|---|---|
| public void write(Node node) throws SAXException A polymorphic method to write any Node to this SAX stream
| |
| write | back to summary |
|---|---|
| public void write(Document document) throws SAXException Generates SAX events for the given Document and all its content
| |
| write | back to summary |
|---|---|
| public void write(Element element) throws SAXException Generates SAX events for the given Element and all its content
| |
| write | back to summary |
|---|---|
| public void write(String text) throws SAXException Generates SAX events for the given text
| |
| write | back to summary |
|---|---|
| public void write(CDATA cdata) throws SAXException Generates SAX events for the given CDATA
| |
| write | back to summary |
|---|---|
| public void write(Comment comment) throws SAXException Generates SAX events for the given Comment
| |
| write | back to summary |
|---|---|
| public void write(Entity entity) throws SAXException Generates SAX events for the given Entity
| |
| write | back to summary |
|---|---|
| public void write(ProcessingInstruction pi) throws SAXException Generates SAX events for the given ProcessingInstruction
| |
| write | back to summary |
|---|---|
| protected void write(Element element, NamespaceStack namespaceStack) throws SAXException | |
| writeClose | back to summary |
|---|---|
| public void writeClose(Element element) throws SAXException
Writes the closing tag of an
| |
| writeContent | back to summary |
|---|---|
| protected void writeContent(Branch branch, NamespaceStack namespaceStack) throws SAXException | |
| writeOpen | back to summary |
|---|---|
| public void writeOpen(Element element) throws SAXException
Writes the opening tag of an
| |