net.sf.xmlmatcher.strategy
Class ChildrenOkMatchingStrategy
java.lang.Object
net.sf.xmlmatcher.strategy.ChildrenOkMatchingStrategy
- All Implemented Interfaces:
- MatchingStrategy
public final class ChildrenOkMatchingStrategy
- extends java.lang.Object
- implements MatchingStrategy
Legacy matching strategy that allows to match template element that has no children,
actual element that has any number of children.
Idea: "actual element may have some children here, I don't about them".
|
Method Summary |
void |
matchContent(org.w3c.dom.Element template,
org.w3c.dom.Element actual,
Matcher matcher)
|
boolean |
select(org.w3c.dom.Element template,
boolean hasChildren)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_ATTR
public static final java.lang.String KEY_ATTR
- See Also:
- Constant Field Values
KEY_VALUE
public static final java.lang.String KEY_VALUE
- See Also:
- Constant Field Values
ChildrenOkMatchingStrategy
public ChildrenOkMatchingStrategy()
select
public boolean select(org.w3c.dom.Element template,
boolean hasChildren)
- Specified by:
select in interface MatchingStrategy
- Parameters:
template - template Element to comparehasChildren - true if given template element has children elements
- Returns:
- true if this strategy can handle comparison of given template to some actual element
matchContent
public void matchContent(org.w3c.dom.Element template,
org.w3c.dom.Element actual,
Matcher matcher)
throws XMLMismatchException
- Specified by:
matchContent in interface MatchingStrategy
- Parameters:
template - Elementactual - Elementmatcher - Matcher (allows to match deeper levels)
- Throws:
XMLMismatchException
Copyright © 2007. All Rights Reserved.