|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.xml.sax.filter.comparators.TagAttributeComparator
Implementation of ElementComparator that matches
on the tag Name and an Attribute value. "Remembers" the path at match time so that
the ProgrammableSAXFilter
can match start and end events.
<Comparator class="com.raritantechnologies.xml.sax.filter.comparators.TagAttributeComparator"
attributeName="[ name of attribute ]"
attributeValue="[ match value ]"
matchIfEquals="true(default)|false"
subPath="[ optional child path to match ]" >
<TagName>[ The Tag Name ]</TagName>
</Comparator>
| Constructor Summary | |
TagAttributeComparator()
|
|
TagAttributeComparator(java.lang.String tagName,
java.lang.String attrQName,
java.util.Comparator attComp)
|
|
TagAttributeComparator(java.lang.String tagName,
java.lang.String attrQName,
java.lang.String attrValue)
|
|
| Method Summary | |
void |
initialize(org.w3c.dom.Element compElem)
|
boolean |
matchesData(char[] data,
int start,
int length)
Checks if the character data matches the criteria of this comparator. |
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)
return false if tag name is incorrect, attribute is not present or if its value does not match. |
boolean |
needsData()
Checks if this comparator needs to see the data section to make a decision. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TagAttributeComparator()
public TagAttributeComparator(java.lang.String tagName,
java.lang.String attrQName,
java.lang.String attrValue)
public TagAttributeComparator(java.lang.String tagName,
java.lang.String attrQName,
java.util.Comparator attComp)
| Method Detail |
public boolean matchesTag(java.lang.String path,
org.xml.sax.Attributes atts)
matchesTag in interface ElementComparatorpath - XML path to the element.atts - Attribute list of the element.
public boolean matchesPath(java.lang.String path)
ElementComparator
matchesPath in interface ElementComparatorpath - XML path to the element.
public boolean needsData()
ElementComparator
needsData in interface ElementComparator
public boolean matchesData(char[] data,
int start,
int length)
ElementComparator
matchesData in interface ElementComparatordata - source character array.start - start position of source characters.length - number of source characters.
public void initialize(org.w3c.dom.Element compElem)
initialize in interface ElementComparator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||