Class XMLFileScanner


  • public class XMLFileScanner
    extends Object
    • Constructor Detail

      • XMLFileScanner

        public XMLFileScanner()
    • Method Detail

      • scanXmlFileForPattern

        public static int scanXmlFileForPattern​(File file,
                                                Pattern searchPattern)
                                         throws org.apache.maven.plugin.MojoExecutionException
        Scans a xml file for a given pattern.
        Parameters:
        file - The file to parse
        searchPattern - The pattern to scan for
        Returns:
        The number of times the pattern appears in the xml file
        Throws:
        org.apache.maven.plugin.MojoExecutionException - When an error occurs while reading the file