public void scan(String originalXml){
  Matcher matcher=INSTRUCTION_PATTERN.matcher(originalXml);
  while (matcher.find()) {
    scanOneInstruction(matcher.group(1));
    containsIgnoredSections=true;
  }
  if (expectedNextInstruction != IGNORE) {
    addError(String.format("Xml processing instructions for sortpom was not properly terminated. Every <?sortpom %s?> must be followed with <?sortpom %s?>",IGNORE,RESUME));
  }
}

public void scan ( String originalXml ) { Matcher matcher = INSTRUCTION_PATTERN . matcher ( originalXml ) ; while ( matcher . find ( ) ) { scanOneInstruction ( matcher . group ( 1 ) ) ; containsIgnoredSections = true ; } if ( expectedNextInstruction != IGNORE ) { addError ( String . format ( "Xml processing instructions for sortpom was not properly terminated. Every <?sortpom %s?> must be followed with <?sortpom %s?>" , IGNORE , RESUME ) ) ; } }
scan and verifies the pom file for processing instructions
