public final class CleanHouse extends XMLFilterImpl2
Removes all elements or attributes in specified deltaxml namespaces.
All elements (including their contents) and attributes within the following namespaces are removed:
- deltaxml - http://www.deltaxml.com/ns/well-formed-delta-v1
- dxwarn2 - http://www.deltaxml.com/ns/warning-for-2-way-merge
CleanHouse
is designed to be used as a post-filter. It should be used as the last filter in the
XMLComparator
output pipeline.
Note: This class has not been designed to be extended, therefore to err on the side of caution, it has been declared final.
Constructor and Description |
---|
CleanHouse()
Creates a new instance of
CleanHouse . |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Overrides the default
characters method. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Overrides the default
endElement method. |
void |
endPrefixMapping(java.lang.String prefix)
Overrides the default
endPrefixMapping method. |
void |
startDocument()
Overrides the default startDocument.
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Overrides the default
startElement method. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Overrides the default
startPrefixMapping method. |
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getProperty, internalEntityDecl, parse, parse, setProperty, startCDATA, startDTD, startEntity
endDocument, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, unparsedEntityDecl, warning
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
method. This version of the method filters out all mappings for
namespaces scheduled for removal.startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class org.xml.sax.helpers.XMLFilterImpl
prefix
- the namespace prefixuri
- the URI of the namespaceorg.xml.sax.SAXException
- the superclass may throw an exception during processing.XMLFilterImpl.startPrefixMapping(String, String)
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
method. This version of the method filters out all mappings for
namespaces scheduled for removal.endPrefixMapping
in interface org.xml.sax.ContentHandler
endPrefixMapping
in class org.xml.sax.helpers.XMLFilterImpl
prefix
- the namespace prefixorg.xml.sax.SAXException
- the superclass may throw an exception during processing.XMLFilterImpl.endPrefixMapping(String)
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
method. This version of the method filters out any elements residing in one
of the namespaces scheduled for removal.startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.XMLFilterImpl
uri
- the URI of the element's namespacelocalName
- the element's localnameqName
- the element's qualified nameatts
- the element's attributesorg.xml.sax.SAXException
- the superclass may throw an exception during processing.XMLFilterImpl.startElement(String, String, String, Attributes)
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
method. This version of the method filters out any elements residing in one of
the namespaces scheduled for removal.endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.XMLFilterImpl
uri
- the URI of the element's namespacelocalName
- the element's localnameqName
- the element's qualified nameorg.xml.sax.SAXException
- the superclass may throw an exception during processing.XMLFilterImpl.endElement(String, String, String)
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException
- the superclass may throw an exception during processingpublic void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
method. This version of the method filters out characters within elements that
are scheduled for removal.characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.XMLFilterImpl
ch
- an array of charactersstart
- the starting position in the arraylength
- the number of characters to use from the arrayorg.xml.sax.SAXException
- the superclass may throw an exception during processing.XMLFilterImpl.characters(char[], int, int)