|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.xml.sax.filter.replacers.AbstractElementReplacer
com.raritantechnologies.xml.sax.filter.replacers.ElementTagRemover
Removes the Tag from an element, leaving just the character data.
Uses the ElementReplacer strategy - replace the tag with just its character data. Works with
the ProgrammableSAXFilter.
<ElementReplacer class="com.raritantechnologies.xml.sax.filter.replacers.ElementTagRemover" >
<ElementComparator class="[ class of com.raritantechnologies.xml.sax.filter.ElementComparator ]" >
</ElementComparator>
</ElementReplacer>
| Constructor Summary | |
ElementTagRemover()
|
|
ElementTagRemover(ElementComparator comp)
|
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
|
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 |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
void |
initialize(org.w3c.dom.Element elem)
subclasses should override this to do XML initialization. |
boolean |
matchesPath(java.lang.String path)
Checks if the XML tag at the specified path matches the criteria of this comparator. |
boolean |
matchesTag(java.lang.String path,
org.xml.sax.Attributes atts)
Checks if the XML tag at the specified path with given attribute list matches the criteria of this comparator. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
| Methods inherited from class com.raritantechnologies.xml.sax.filter.replacers.AbstractElementReplacer |
endDocument, endPrefixMapping, ignorableWhitespace, matchesData, needsData, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ElementTagRemover()
public ElementTagRemover(ElementComparator comp)
| Method Detail |
public boolean matchesTag(java.lang.String path,
org.xml.sax.Attributes atts)
ElementComparator
matchesTag in interface ElementComparatormatchesTag in class AbstractElementReplacerpublic boolean matchesPath(java.lang.String path)
ElementComparator
matchesPath in interface ElementComparatormatchesPath in class AbstractElementReplacer
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)
public void elementEnding(org.xml.sax.ContentHandler cHandler)
ElementReplacer
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class AbstractElementReplacerorg.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class AbstractElementReplacerorg.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class AbstractElementReplacerorg.xml.sax.SAXExceptionpublic void initialize(org.w3c.dom.Element elem)
AbstractElementReplacer
initialize in interface ElementComparatorinitialize in class AbstractElementReplacer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||