Class GrokParser

java.lang.Object
org.owasp.dependencycheck.xml.assembly.GrokParser

@ThreadSafe public class GrokParser extends Object
A simple validating parser for XML Grok Assembly XML files.
Author:
Jeremy Long
  • Field Details

  • Constructor Details

    • GrokParser

      public GrokParser()
  • Method Details

    • parse

      public AssemblyData parse(File file) throws GrokParseException
      Parses the given XML file and returns the assembly data.
      Parameters:
      file - an XML file containing assembly data
      Returns:
      the assembly data
      Throws:
      GrokParseException - thrown if the XML file cannot be parsed
    • parse

      public AssemblyData parse(InputStream inputStream) throws GrokParseException
      Parses the given XML stream and returns the contained assembly data.
      Parameters:
      inputStream - an InputStream containing assembly data
      Returns:
      the assembly data
      Throws:
      GrokParseException - thrown if the XML cannot be parsed