Package org.apache.daffodil.api
Interface DaffodilUnparseContentHandler
- All Superinterfaces:
ContentHandler
Accepts SAX callback events from any SAX XMLReader for unparsing
-
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String uri, String localName, String qName) voidendPrefixMapping(String prefix) voidfinish()Ensure calls togetUnparseResult()return a value and clean up internal state.Returns the result of the SAX unparse containing diagnostic information.voidignorableWhitespace(char[] ch, int start, int length) voidprocessingInstruction(String target, String data) voidsetDocumentLocator(Locator locator) voidskippedEntity(String name) voidvoidstartElement(String uri, String localName, String qName, Attributes attributes) voidstartPrefixMapping(String prefix, String uri) Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Method Details
-
getUnparseResult
UnparseResult getUnparseResult()Returns the result of the SAX unparse containing diagnostic information. Thefinish()method should be called prior to calling this function. If the XMLReader parse method throws a DaffodilUnhandledSAXException, which generally indicates a bug, this will return null.- Returns:
- result of the SAX unparse containing diagnostic information
-
finish
void finish()Ensure calls togetUnparseResult()return a value and clean up internal state. This should be called after XMLReader parsing has ended, even if the XMLReader throws an exception. -
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
DaffodilUnparseErrorSAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
DaffodilUnparseErrorSAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler
-
startElement
void startElement(String uri, String localName, String qName, Attributes attributes) throws DaffodilUnparseErrorSAXException - Specified by:
startElementin interfaceContentHandler- Throws:
DaffodilUnparseErrorSAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
DaffodilUnparseErrorSAXException
-
characters
void characters(char[] ch, int start, int length) - Specified by:
charactersin interfaceContentHandler
-
ignorableWhitespace
void ignorableWhitespace(char[] ch, int start, int length) - Specified by:
ignorableWhitespacein interfaceContentHandler
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler
-