net.sf.xmlmatcher
Class MatcherChain

java.lang.Object
  extended by net.sf.xmlmatcher.matcher.MatcherImpl
      extended by net.sf.xmlmatcher.MatcherChain
All Implemented Interfaces:
Matcher

public final class MatcherChain
extends MatcherImpl

Chain of Matchers


Field Summary
 
Fields inherited from interface net.sf.xmlmatcher.Matcher
XML_NAMESPACE_URI
 
Constructor Summary
MatcherChain(Matcher[] chain)
           
 
Method Summary
 void matchElements(org.w3c.dom.Element template, org.w3c.dom.Element actual)
          Compare two XML trees specified by given elements.
 void setTopLevelMatcher(Matcher top)
           
 
Methods inherited from class net.sf.xmlmatcher.matcher.MatcherImpl
addListener, getTopLevelMatcher, match, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatcherChain

public MatcherChain(Matcher[] chain)
Method Detail

setTopLevelMatcher

public final void setTopLevelMatcher(Matcher top)
Specified by:
setTopLevelMatcher in interface Matcher
Overrides:
setTopLevelMatcher in class MatcherImpl
See Also:
MatcherImpl.getTopLevelMatcher()

matchElements

public void matchElements(org.w3c.dom.Element template,
                          org.w3c.dom.Element actual)
                   throws MatcherException
Description copied from class: MatcherImpl
Compare two XML trees specified by given elements. Verifies that template and actual elements have the same tag name and namespace, then invokes most appropriate comparator based on template element.

Specified by:
matchElements in class MatcherImpl
Parameters:
template - Template Element
actual - Actual Element (instance)
Throws:
MatcherException


Copyright © 2007. All Rights Reserved.