public class XmlParser extends CycloneDxSchema implements Parser
Bom object.ALL_VERSIONS, NS_BOM_10, NS_BOM_11, NS_BOM_12, NS_BOM_13, NS_BOM_14, NS_BOM_15, NS_BOM_16, NS_BOM_LATEST, NS_DEPENDENCY_GRAPH_10, VERSION_LATEST| Constructor and Description |
|---|
XmlParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid(byte[] bomBytes)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(byte[] bomBytes,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
boolean |
isValid(File file)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(File file,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
boolean |
isValid(InputStream inputStream)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(InputStream inputStream,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
boolean |
isValid(Reader reader)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(Reader reader,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
Bom |
parse(byte[] bomBytes)
Parses a CycloneDX BOM.
|
Bom |
parse(File file)
Parses a CycloneDX BOM.
|
Bom |
parse(InputStream inputStream)
Parses a CycloneDX BOM.
|
Bom |
parse(Reader reader)
Parses a CycloneDX BOM.
|
List<ParseException> |
validate(byte[] bomBytes)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(byte[] bomBytes,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
List<ParseException> |
validate(File file)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(File file,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
List<ParseException> |
validate(InputStream inputStream)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(InputStream inputStream,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
List<ParseException> |
validate(Reader reader)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(Reader reader,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
List<ParseException> |
validate(Source source,
Version schemaVersion) |
getJsonSchema, getXmlSchema, getXmlSchemapublic Bom parse(File file) throws ParseException
parse in interface Parserfile - a File to parseParseException - when errors are encounteredpublic Bom parse(byte[] bomBytes) throws ParseException
parse in interface ParserbomBytes - the byte array to parseParseException - when errors are encounteredpublic Bom parse(InputStream inputStream) throws ParseException
parse in interface ParserinputStream - the InputStream from which to parseParseException - when errors are encounteredpublic Bom parse(Reader reader) throws ParseException
parse in interface Parserreader - the Reader from which to parseParseException - when errors are encounteredpublic List<ParseException> validate(File file) throws IOException
validate in interface Parserfile - the CycloneDX BOM file to validateIOException - when errors are encounteredpublic List<ParseException> validate(File file, Version schemaVersion) throws IOException
validate in interface Parserfile - the CycloneDX BOM file to validateschemaVersion - the schema version to validate againstIOException - when errors are encounteredpublic List<ParseException> validate(byte[] bomBytes) throws IOException
validate in interface ParserbomBytes - the byte array to validateIOException - when errors are encounteredpublic List<ParseException> validate(byte[] bomBytes, Version schemaVersion) throws IOException
validate in interface ParserbomBytes - the byte array to validateschemaVersion - the schema version to validate againstIOException - when errors are encounteredpublic List<ParseException> validate(Reader reader) throws IOException
validate in interface Parserreader - the Reader from which to parseIOException - when errors are encounteredpublic List<ParseException> validate(Reader reader, Version schemaVersion) throws IOException
validate in interface Parserreader - the Reader from which to parseschemaVersion - the schema version to validate againstIOException - when errors are encounteredpublic List<ParseException> validate(InputStream inputStream) throws IOException
validate in interface ParserinputStream - the InputStream from which to validateIOException - when errors are encounteredpublic List<ParseException> validate(InputStream inputStream, Version schemaVersion) throws IOException
validate in interface ParserinputStream - the InputStream from which to validateschemaVersion - the schema version to validate againstIOException - when errors are encounteredpublic List<ParseException> validate(Source source, Version schemaVersion) throws IOException
IOExceptionpublic boolean isValid(File file) throws IOException
isValid in interface Parserfile - the CycloneDX BOM file to validateIOException - when errors are encounteredpublic boolean isValid(File file, Version schemaVersion) throws IOException
isValid in interface Parserfile - the CycloneDX BOM file to validateschemaVersion - the schema version to validate againstIOException - when errors are encounteredpublic boolean isValid(byte[] bomBytes)
throws IOException
isValid in interface ParserbomBytes - the byte array to validateIOException - when errors are encounteredpublic boolean isValid(byte[] bomBytes,
Version schemaVersion)
throws IOException
isValid in interface ParserbomBytes - the byte array to validateschemaVersion - the schema version to validate againstIOException - when errors are encounteredpublic boolean isValid(Reader reader) throws IOException
isValid in interface Parserreader - the Reader from which to validateIOException - when errors are encounteredpublic boolean isValid(Reader reader, Version schemaVersion) throws IOException
isValid in interface Parserreader - the Reader from which to validateschemaVersion - the schema version to validate againstIOException - when errors are encounteredpublic boolean isValid(InputStream inputStream) throws IOException
isValid in interface ParserinputStream - the InputStream from which to validateIOException - when errors are encounteredpublic boolean isValid(InputStream inputStream, Version schemaVersion) throws IOException
isValid in interface ParserinputStream - the InputStream from which to validateschemaVersion - the schema version to validate againstIOException - when errors are encounteredCopyright © 2017–2025 OWASP Foundation. All rights reserved.