Class PomParser
- java.lang.Object
-
- org.owasp.dependencycheck.xml.pom.PomParser
-
@ThreadSafe public class PomParser extends java.lang.Object
A parser for pom.xml files.- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description PomParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Model
parse(java.io.File file)
Parses the given xml file and returns a Model object containing only the fields dependency-check requires.Model
parse(java.io.InputStream inputStream)
Parses the given XML file and returns a Model object containing only the fields dependency-check requires.Model
parseWithoutDocTypeCleanup(java.io.File file)
Parses the given xml file and returns a Model object containing only the fields dependency-check requires.Model
parseWithoutDocTypeCleanup(java.io.InputStream inputStream)
Parses the given XML file and returns a Model object containing only the fields dependency-check requires.
-
-
-
Method Detail
-
parse
public Model parse(java.io.File file) throws PomParseException
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
public Model parseWithoutDocTypeCleanup(java.io.File file) throws PomParseException
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
public Model parse(java.io.InputStream inputStream) throws PomParseException
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
public Model parseWithoutDocTypeCleanup(java.io.InputStream inputStream) throws PomParseException
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
-
-