public class BomXmlGenerator extends AbstractBomGenerator
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PROLOG |
bom, format, mapper, versionALL_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 |
|---|
BomXmlGenerator(Bom bom,
Version version)
Constructs a new BomXmlGenerator object.
|
| Modifier and Type | Method and Description |
|---|---|
Document |
generate()
Creates a CycloneDX BoM from a set of Components.
|
protected Document |
generateDocument(Bom bom) |
String |
toString()
Creates a text representation of a CycloneDX BoM Document.
|
String |
toXmlString() |
getFormat, getSchemaVersion, setupObjectMappergetJsonSchema, getXmlSchema, getXmlSchemaprotected static final String PROLOG
protected Document generateDocument(Bom bom) throws ParserConfigurationException
ParserConfigurationExceptionpublic Document generate() throws ParserConfigurationException
ParserConfigurationException - if an error occurspublic String toXmlString() throws GeneratorException
GeneratorExceptionpublic String toString()
toXmlString() and will return
an empty string if toXmlString() throws an exception. It's preferred to call toXmlString()
directly so that exceptions can be caught.Copyright © 2017–2025 OWASP Foundation. All rights reserved.