|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jenkinsci.plugins.neoload_integration.supporting.XMLUtilities
public final class XMLUtilities
Method Summary | |
---|---|
static Node |
createNodeFromText(String xmlText)
Create an xml Node using the passed in text. |
static List<Node> |
findByExpression(String expression,
Node searchNode)
Return all nodes matching the passed in expression. |
static Node |
findFirstByExpression(String expression,
Node searchNode)
Return the first node matching the passed in expression or null if none was found. |
static String |
findFirstValueByExpression(String expression,
Node searchNode)
|
static Map<String,String> |
getMap(NamedNodeMap attributes)
|
static String |
nodeToString(Node n)
|
static Document |
readXmlFile(String srcFile)
Read an xml file. |
static List<Node> |
toList(NodeList nodeList)
Turns a NodeList into a list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Node createNodeFromText(String xmlText) throws ParserConfigurationException, SAXException, IOException
xmlText
-
ParserConfigurationException
SAXException
IOException
public static List<Node> findByExpression(String expression, Node searchNode) throws XPathExpressionException
Expression | Description |
---|---|
nodename | Selects all nodes with the name "nodename" |
/ | Selects from the root node |
// | Selects nodes in the document from the current node that match the selection no matter where they are |
. | Selects the current node |
.. | Selects the parent of the current node |
@ | Selects attributes |
expression
- search for this expressionnodes
- search this and all child nodes
XPathExpressionException
public static Node findFirstByExpression(String expression, Node searchNode) throws XPathExpressionException
expression
- searchNode
-
XPathExpressionException
public static String findFirstValueByExpression(String expression, Node searchNode) throws XPathExpressionException
expression
- searchNode
-
XPathExpressionException
public static Map<String,String> getMap(NamedNodeMap attributes)
attributes
-
public static List<Node> toList(NodeList nodeList)
nodeList
-
public static String nodeToString(Node n) throws TransformerException
n
-
TransformerException
public static Document readXmlFile(String srcFile) throws ParserConfigurationException, SAXException, IOException
srcFile
-
ParserConfigurationException
SAXException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |