public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
getDocument(String xmlFile) |
static Node |
getNodeByTagName(NodeList nodeList,
String tagName) |
static NodeList |
getNodeList(Document document,
String tagName) |
static String[] |
getNoSnapshotArtifactIdsTextContent(Document document) |
static String |
getTextContentOfDocument(Document document,
String encode) |
public static Document getDocument(String xmlFile) throws ParserConfigurationException, SAXException, IOException
xmlFile - represents localization or name file of the XML file (e.g.
pom.xml)ParserConfigurationException - Consult documentation of the API.SAXException - Consult documentation of the API.IOException - Consult documentation of the API.Documentpublic static String[] getNoSnapshotArtifactIdsTextContent(Document document)
document - is Document object.Documentpublic static String getTextContentOfDocument(Document document, String encode) throws ClassNotFoundException, InstantiationException, IllegalAccessException
document - is Document object that represents XML file.encode - is charset encode for document.ClassNotFoundException - Consult documentation of the API.InstantiationException - Consult documentation of the API.IllegalAccessException - Consult documentation of the API.DocumentCopyright © 2018 Educode. All rights reserved.