Klasse XMLUtils
java.lang.Object
io.jenkins.plugins.coverage.adapter.util.XMLUtils
Utils class used for XML related operations.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungconvertToDocumentWithXSL
(StreamSource xsl, File source) Use XSL to transform source xml file toDocument
.convertToDOMResultWithXSL
(StreamSource xsl, File source) Use XSL to transform source xml file toDOMResult
.convertToSAXResultWithXSL
(StreamSource xsl, File source) Use XSL to transform source xml file toSAXResult
.static XMLUtils
readXMLtoDocument
(File file) Read xml file and return it asDocument
format.void
writeDocumentToXML
(Document document, File target) WriteDocument
to target file.
-
Methodendetails
-
getInstance
-
convertToDocumentWithXSL
public Document convertToDocumentWithXSL(StreamSource xsl, File source) throws FileNotFoundException, CoverageException Use XSL to transform source xml file toDocument
.- Parameter:
xsl
- XSL sourcesource
- source xml file- Gibt zurück:
- document transformed from source file
- Löst aus:
FileNotFoundException
CoverageException
-
convertToDOMResultWithXSL
public DOMResult convertToDOMResultWithXSL(StreamSource xsl, File source) throws FileNotFoundException, CoverageException Use XSL to transform source xml file toDOMResult
.- Parameter:
xsl
- XSL sourcesource
- source xml file- Gibt zurück:
- DOMResult transformed from source file
- Löst aus:
FileNotFoundException
CoverageException
-
convertToSAXResultWithXSL
public SAXResult convertToSAXResultWithXSL(StreamSource xsl, File source) throws FileNotFoundException, CoverageException Use XSL to transform source xml file toSAXResult
.- Parameter:
xsl
- XSL sourcesource
- source xml file- Gibt zurück:
- SAXResult transformed from source file
- Löst aus:
FileNotFoundException
CoverageException
-
writeDocumentToXML
WriteDocument
to target file.- Parameter:
document
- document be writtentarget
- target file written to
-
readXMLtoDocument
Read xml file and return it asDocument
format.- Parameter:
file
- xml file be read- Gibt zurück:
- document converted by xml
- Löst aus:
TransformerException
- file cannot be convert toDocument
-