public class GenerationHelperContentHandler extends DelegatingContentHandler
Constructor and Description |
---|
GenerationHelperContentHandler(ContentHandler handler,
String mainNamespace,
Object contentHandlerContext)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
element(org.apache.xmlgraphics.util.QName qName,
Attributes atts)
Convenience method to generate an empty element with attributes.
|
void |
element(String localName,
Attributes atts)
Convenience method to generate an empty element with attributes.
|
void |
endElement(org.apache.xmlgraphics.util.QName qName)
Convenience method to generate a startElement SAX event.
|
void |
endElement(String localName)
Convenience method to generate a endElement SAX event.
|
Object |
getContentHandlerContext()
Returns the context object (may be null).
|
String |
getMainNamespace()
Returns the main namespace used for generated XML content.
|
void |
setMainNamespace(String namespaceURI)
Sets the main namespace used for generated XML content when abbreviated ContentHandler
calls are used.
|
void |
startElement(org.apache.xmlgraphics.util.QName qName)
Convenience method to generate a startElement SAX event.
|
void |
startElement(org.apache.xmlgraphics.util.QName qName,
Attributes atts)
Convenience method to generate a startElement SAX event.
|
void |
startElement(String localName)
Convenience method to generate a startElement SAX event.
|
void |
startElement(String localName,
Attributes atts)
Convenience method to generate a startElement SAX event.
|
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, error, fatalError, getDelegateContentHandler, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDelegateContentHandler, setDelegateDTDHandler, setDelegateEntityResolver, setDelegateErrorHandler, setDelegateLexicalHandler, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, unparsedEntityDecl, warning
public GenerationHelperContentHandler(ContentHandler handler, String mainNamespace, Object contentHandlerContext)
handler
- the SAX content handler to delegate all calls tomainNamespace
- the main namespace used for generated XML content when abbreviated
ContentHandler calls are used.contentHandlerContext
- additional content handler context statepublic String getMainNamespace()
public void setMainNamespace(String namespaceURI)
namespaceURI
- the new main namespace URIpublic Object getContentHandlerContext()
public void startElement(String localName, Attributes atts) throws SAXException
localName
- the local name of the elementatts
- the attributesSAXException
- if a SAX exception occurspublic void startElement(String localName) throws SAXException
localName
- the local name of the elementSAXException
- if a SAX exception occurspublic void startElement(org.apache.xmlgraphics.util.QName qName, Attributes atts) throws SAXException
qName
- the qualified name of the elementatts
- the attributesSAXException
- if a SAX exception occurspublic void startElement(org.apache.xmlgraphics.util.QName qName) throws SAXException
qName
- the qualified name of the elementSAXException
- if a SAX exception occurspublic void endElement(String localName) throws SAXException
localName
- the local name of the elementSAXException
- if a SAX exception occurspublic void endElement(org.apache.xmlgraphics.util.QName qName) throws SAXException
qName
- the qualified name of the elementSAXException
- if a SAX exception occurspublic void element(String localName, Attributes atts) throws SAXException
localName
- the local name of the elementatts
- the attributesSAXException
- if a SAX exception occurspublic void element(org.apache.xmlgraphics.util.QName qName, Attributes atts) throws SAXException
qName
- the qualified name of the elementatts
- the attributesSAXException
- if a SAX exception occursCopyright © 2025 Apache Software Foundation. All rights reserved.