Class PomParser
java.lang.Object
org.owasp.dependencycheck.xml.pom.PomParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionParses the given xml file and returns a Model object containing only the fields dependency-check requires.parse(InputStream inputStream) Parses the given XML file and returns a Model object containing only the fields dependency-check requires.Parses the given xml file and returns a Model object containing only the fields dependency-check requires.parseWithoutDocTypeCleanup(InputStream inputStream) Parses the given XML file and returns a Model object containing only the fields dependency-check requires.
-
Constructor Details
-
PomParser
public PomParser()
-
-
Method Details
-
parse
Parses the given xml file and returns a Model object containing only the fields dependency-check requires. An attempt is made to remove any doctype definitions.- Parameters:
file- a pom.xml- Returns:
- a Model object containing only the fields dependency-check requires
- Throws:
PomParseException- thrown if the xml file cannot be parsed
-
parseWithoutDocTypeCleanup
Parses the given xml file and returns a Model object containing only the fields dependency-check requires. No attempt is made to remove doctype definitions.- Parameters:
file- a pom.xml- Returns:
- a Model object containing only the fields dependency-check requires
- Throws:
PomParseException- thrown if the xml file cannot be parsed
-
parse
Parses the given XML file and returns a Model object containing only the fields dependency-check requires. An attempt is made to remove any doctype definitions.- Parameters:
inputStream- an InputStream containing suppression rues- Returns:
- a list of suppression rules
- Throws:
PomParseException- if the XML cannot be parsed
-
parseWithoutDocTypeCleanup
Parses the given XML file and returns a Model object containing only the fields dependency-check requires. No attempt is made to remove doctype definitions.- Parameters:
inputStream- an InputStream containing suppression rues- Returns:
- a list of suppression rules
- Throws:
PomParseException- if the XML cannot be parsed
-