Class HintParser

java.lang.Object
org.owasp.dependencycheck.xml.hints.HintParser

@NotThreadSafe public class HintParser extends Object
A simple validating parser for XML Hint Rules.
Author:
Jeremy Long
  • Constructor Details

    • HintParser

      public HintParser()
  • Method Details

    • getHintRules

      public List<HintRule> getHintRules()
      Returns the hint rules.
      Returns:
      the hint rules
    • getVendorDuplicatingHintRules

      public List<VendorDuplicatingHintRule> getVendorDuplicatingHintRules()
      Returns the vendor duplicating hint rules.
      Returns:
      the vendor duplicating hint rules
    • parseHints

      public void parseHints(File file) throws HintParseException
      Parses the given XML file and returns a list of the hints contained.
      Parameters:
      file - an XML file containing hints
      Throws:
      HintParseException - thrown if the XML file cannot be parsed
    • parseHints

      public void parseHints(InputStream inputStream) throws HintParseException, SAXException
      Parses the given XML stream and returns a list of the hint rules contained.
      Parameters:
      inputStream - an InputStream containing hint rules
      Throws:
      HintParseException - thrown if the XML cannot be parsed
      SAXException - thrown if the XML cannot be parsed