added a mode for the root node match
added a mode for xhtml  root node match