com.raritantechnologies.xml.sax.filter.replacers
Class SAXElementReplacer
java.lang.Object
com.raritantechnologies.xml.sax.filter.replacers.AbstractElementReplacer
com.raritantechnologies.xml.sax.filter.replacers.SAXElementReplacer
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, ElementComparator, ElementReplacer, IConfigurable
- public class SAXElementReplacer
- extends AbstractElementReplacer
Replaces an element with XML. Between invocations of the elementStarting and elementEnding
ContentHandler calls by the ProgrammableSAXFilter,
replaces the source with new XML.
XML Configuration Template:
<ElementReplacer class="com.raritantechnologies.xml.sax.filter.replacers.SAXElementReplacer"
elementName="[tag name of element ]" >
<ElementComparator class="[ class of com.raritantechnologies.xml.sax.filter.ElementComparator ]" >
</ElementComparator>
<[elementName]>
<!-- XML to replace element with -->
</[elementName]>
</ElementReplacer>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
|
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)
|
void |
initialize(org.w3c.dom.Element elem)
subclasses should override this to do XML initialization. |
| Methods inherited from class com.raritantechnologies.xml.sax.filter.replacers.AbstractElementReplacer |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, matchesData, matchesPath, matchesTag, needsData, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAXElementReplacer
public SAXElementReplacer()
SAXElementReplacer
public SAXElementReplacer(ElementComparator comp,
java.lang.String xmlSource)
SAXElementReplacer
public SAXElementReplacer(ElementComparator comp,
IXMLSource xmlSource)
SAXElementReplacer
public SAXElementReplacer(ElementComparator comp,
IXMLSource xmlSource,
java.lang.String sourceName)
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.
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from class:
AbstractElementReplacer
- subclasses should override this to do XML initialization.
- Specified by:
initialize in interface ElementComparator- Overrides:
initialize in class AbstractElementReplacer