com.raritech.xml.sax.filter
Interface ElementReplacer
- All Superinterfaces:
- org.xml.sax.ContentHandler, ElementComparator
- All Known Implementing Classes:
- AbstractElementReplacer
- public interface ElementReplacer
- extends ElementComparator, org.xml.sax.ContentHandler
ElementReplacers are used by the ProgrammableSAXFilter to replace an
element in the XML. They are added to the filter using the method:
public void addElementReplacer( ElementReplacerImpl replacer );
When the element is detected by the comparator, the
ProgrammableSAXFilter calls the elementStarted
method on the replacer. Then, all SAx events from startElement to endElement,
are forwarded to the replacer. The ElementReplacer can call methods
on the ContentHandler at the start,
during or at elementEnding. After the matching endElement( ) method is
called, the ProgrammableSAXFilter resumes normal handling.
The precedence order of ProgrammableSAXFilter tools is thus
deletion > replacement > modification/notification.
|
Method Summary |
void |
elementEnding(org.xml.sax.ContentHandler cHandler)
Signals that the next endElement call will be the last one handled by this
ElementReplacer. |
void |
elementStarting(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs,
org.xml.sax.ContentHandler cHandler)
|
| Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
elementStarting
public void elementStarting(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs,
org.xml.sax.ContentHandler cHandler)
elementEnding
public void elementEnding(org.xml.sax.ContentHandler cHandler)
- Signals that the next endElement call will be the last one handled by this
ElementReplacer.