public class XmlHelper extends Object
| Constructor and Description |
|---|
XmlHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addOutputParamValuesToConfig(String outputParams,
String responseBody)
In outputParams get the params with syntax <$>
in responseBody And Then add them to ConfigurationParams
|
static String |
convertDocumentToString(Document doc)
Convert a contents of a Document to a String
|
static String |
convertXmlFileToString(Path filePath)
Convert contents of an XML file to a string
|
static Document |
convertXmlStringToDocument(String xmlStr)
Convert a String in XML format to a Document
|
static NodeList |
getNodeList(String xpathString,
String xmlString)
Get text value of the node specified by xpath
|
static String |
getNodeValue(String xpathString,
String xmlString)
Get text value of the node specified by xpath
|
ArrayList<String> |
getXPaths(String xmlString)
Get the list of xPaths corresponding to the input XML String
|
static Document |
readFile(String inputFilePath)
Read a XML file And get a Document retrying And catching interruptions from
other threads.
|
public static String convertDocumentToString(Document doc)
doc - public static Document convertXmlStringToDocument(String xmlStr)
xmlStr - public static String convertXmlFileToString(Path filePath)
filePath - public static Document readFile(String inputFilePath)
inputFilePath - public static String getNodeValue(String xpathString, String xmlString)
xpathString - xmlString - public static NodeList getNodeList(String xpathString, String xmlString)
xpathString - xmlString - public static void addOutputParamValuesToConfig(String outputParams, String responseBody)
outputParams - responseBody - Copyright © 2019. All rights reserved.