|
||||||||||
| 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 org.w3c.dom.Node |
createNodeFromText(java.lang.String xmlText)
Create an xml Node using the passed in text. |
static java.util.List<org.w3c.dom.Node> |
findByExpression(java.lang.String expression,
org.w3c.dom.Node searchNode)
Return all nodes matching the passed in expression. |
static org.w3c.dom.Node |
findFirstByExpression(java.lang.String expression,
org.w3c.dom.Node searchNode)
Return the first node matching the passed in expression or null if none was found. |
static java.util.Map<java.lang.String,java.lang.String> |
getMap(org.w3c.dom.NamedNodeMap attributes)
|
static org.w3c.dom.Document |
readXmlFile(java.lang.String srcFile)
Read an xml file. |
static java.util.List<org.w3c.dom.Node> |
toList(org.w3c.dom.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 org.w3c.dom.Node createNodeFromText(java.lang.String xmlText)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
xmlText -
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public static java.util.List<org.w3c.dom.Node> findByExpression(java.lang.String expression,
org.w3c.dom.Node searchNode)
throws javax.xml.xpath.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
javax.xml.xpath.XPathExpressionException
public static org.w3c.dom.Node findFirstByExpression(java.lang.String expression,
org.w3c.dom.Node searchNode)
throws javax.xml.xpath.XPathExpressionException
expression - searchNode -
javax.xml.xpath.XPathExpressionExceptionpublic static java.util.Map<java.lang.String,java.lang.String> getMap(org.w3c.dom.NamedNodeMap attributes)
attributes -
public static java.util.List<org.w3c.dom.Node> toList(org.w3c.dom.NodeList nodeList)
nodeList -
public static org.w3c.dom.Document readXmlFile(java.lang.String srcFile)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
srcFile -
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||