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 XMLUtilsreadXMLtoDocument(File file) Read xml file and return it asDocumentformat.voidwriteDocumentToXML(Document document, File target) WriteDocumentto 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:
FileNotFoundExceptionCoverageException
-
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:
FileNotFoundExceptionCoverageException
-
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:
FileNotFoundExceptionCoverageException
-
writeDocumentToXML
WriteDocumentto target file.- Parameter:
document- document be writtentarget- target file written to
-
readXMLtoDocument
Read xml file and return it asDocumentformat.- Parameter:
file- xml file be read- Gibt zurück:
- document converted by xml
- Löst aus:
TransformerException- file cannot be convert toDocument
-