test_class.declarator: xmlUtil
test_class.modifier: private
test_class.original_string: private XMLUtil xmlUtil;
test_class.type: XMLUtil
test_class.var_name: xmlUtil
test_class.declarator: XML_EXAMPLE = "<A><B>value1</B><B>value2</B><C><D>Test!</D></C></A>"
test_class.modifier: private static final
test_class.original_string: private static final String XML_EXAMPLE = "<A><B>value1</B><B>value2</B><C><D>Test!</D></C></A>";
test_class.type: String
test_class.var_name: XML_EXAMPLE
test_class.file: BackEnd/Core/sailfish-core/src/test/java/com/exactpro/sf/actions/TestXMLUtil.java
test_class.identifier: TestXMLUtil
test_case.body: @Test(expected = EPSCommonException.class)
      public void testGetListByXPathException() {
          List<String> list = xmlUtil.getListByXPath(XML_EXAMPLE, "A/C");
      }
test_case.class_method_signature: TestXMLUtil.testGetListByXPathException()
test_case.full_signature: @Test(expected = EPSCommonException.class) public void testGetListByXPathException()
test_case.identifier: testGetListByXPathException
test_case.invocations: getListByXPath
test_case.modifiers: @Test(expected = EPSCommonException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetListByXPathException()
focal_class.declarator: xpathFactory = XPathFactory.newInstance()
focal_class.modifier: private final
focal_class.original_string: private final XPathFactory xpathFactory = XPathFactory.newInstance();
focal_class.type: XPathFactory
focal_class.var_name: xpathFactory
focal_class.declarator: documentFactory = DocumentBuilderFactory.newInstance()
focal_class.modifier: private final
focal_class.original_string: private final DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();
focal_class.type: DocumentBuilderFactory
focal_class.var_name: documentFactory
focal_class.file: BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/actions/XMLUtil.java
focal_class.identifier: XMLUtil
focal_class.class_method_signature: XMLUtil.setValueByXPath(String content, String xpath, String value)
focal_class.full_signature: @Description("Returns a xml document with new value of selected node.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to node<br>" + "<b>value</b> - new value of node<br>" + "Example:<br/>" + "#{setValueByXPath(content, xpath, value)}") @UtilityMethod public String setValueByXPath(String content, String xpath, String value)
focal_class.identifier: setValueByXPath
focal_class.modifiers: @Description("Returns a xml document with new value of selected node.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to node<br>" + "<b>value</b> - new value of node<br>" + "Example:<br/>" + "#{setValueByXPath(content, xpath, value)}") @UtilityMethod public
focal_class.parameters: (String content, String xpath, String value)
focal_class.return: String
focal_class.signature: String setValueByXPath(String content, String xpath, String value)
focal_class.class_method_signature: XMLUtil.getValueByXPath(String content, String xpath)
focal_class.full_signature: @Description("Returns a value of node by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to node<br>" + "Example:<br/>" + "#{getObjectByXPath(content, xpath)}") @UtilityMethod public String getValueByXPath(String content, String xpath)
focal_class.identifier: getValueByXPath
focal_class.modifiers: @Description("Returns a value of node by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to node<br>" + "Example:<br/>" + "#{getObjectByXPath(content, xpath)}") @UtilityMethod public
focal_class.parameters: (String content, String xpath)
focal_class.return: String
focal_class.signature: String getValueByXPath(String content, String xpath)
focal_class.class_method_signature: XMLUtil.getObjectByXPath(String content, String xpath)
focal_class.full_signature: @Description("Returns a object by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to object<br>" + "Example:<br/>" + "#{getObjectByXPath(content, xpath)}") @UtilityMethod public Map<String, ?> getObjectByXPath(String content, String xpath)
focal_class.identifier: getObjectByXPath
focal_class.modifiers: @Description("Returns a object by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to object<br>" + "Example:<br/>" + "#{getObjectByXPath(content, xpath)}") @UtilityMethod public
focal_class.parameters: (String content, String xpath)
focal_class.return: Map<String, ?>
focal_class.signature: Map<String, ?> getObjectByXPath(String content, String xpath)
focal_class.class_method_signature: XMLUtil.getListByXPath(String content, String xpath)
focal_class.full_signature: @Description("Returns a list values by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to list<br>" + "Example:<br/>" + "#{getListByXPath(content, xpath)}") @UtilityMethod public List<String> getListByXPath(String content, String xpath)
focal_class.identifier: getListByXPath
focal_class.modifiers: @Description("Returns a list values by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to list<br>" + "Example:<br/>" + "#{getListByXPath(content, xpath)}") @UtilityMethod public
focal_class.parameters: (String content, String xpath)
focal_class.return: List<String>
focal_class.signature: List<String> getListByXPath(String content, String xpath)
focal_class.class_method_signature: XMLUtil.getNodesByXPath(String content, String xpath)
focal_class.full_signature: private NodeList getNodesByXPath(String content, String xpath)
focal_class.identifier: getNodesByXPath
focal_class.modifiers: private
focal_class.parameters: (String content, String xpath)
focal_class.return: NodeList
focal_class.signature: NodeList getNodesByXPath(String content, String xpath)
focal_class.class_method_signature: XMLUtil.hasOnlyTextNode(Node node)
focal_class.full_signature: private static boolean hasOnlyTextNode(Node node)
focal_class.identifier: hasOnlyTextNode
focal_class.modifiers: private static
focal_class.parameters: (Node node)
focal_class.return: boolean
focal_class.signature: boolean hasOnlyTextNode(Node node)
focal_class.class_method_signature: XMLUtil.nodeToString(Node node)
focal_class.full_signature: private static String nodeToString(Node node)
focal_class.identifier: nodeToString
focal_class.modifiers: private static
focal_class.parameters: (Node node)
focal_class.return: String
focal_class.signature: String nodeToString(Node node)
focal_class.class_method_signature: XMLUtil.nodeToMap(Node node)
focal_class.full_signature: private static Map<String, ?> nodeToMap(Node node)
focal_class.identifier: nodeToMap
focal_class.modifiers: private static
focal_class.parameters: (Node node)
focal_class.return: Map<String, ?>
focal_class.signature: Map<String, ?> nodeToMap(Node node)
focal_class.class_method_signature: XMLUtil.nodeListToList(NodeList nodeList, Predicate<Node> ... filters)
focal_class.full_signature: private static List<Node> nodeListToList(NodeList nodeList, Predicate<Node> ... filters)
focal_class.identifier: nodeListToList
focal_class.modifiers: private static
focal_class.parameters: (NodeList nodeList, Predicate<Node> ... filters)
focal_class.return: List<Node>
focal_class.signature: List<Node> nodeListToList(NodeList nodeList, Predicate<Node> ... filters)
focal_class.superclass: extends AbstractCaller
focal_method.body: @Description("Returns a list values by xpath.<br>" +
              "<b>content</b> - xml document<br>" +
              "<b>xpath</b> - path to list<br>" +
              "Example:<br/>" +
              "#{getListByXPath(content, xpath)}")
      @UtilityMethod
      public List<String> getListByXPath(String content, String xpath) {
          NodeList nodes = getNodesByXPath(content, xpath);
          if (nodes.getLength() == 0) {
              return Collections.emptyList();
          }
  
          List<String> result = new ArrayList<>();
          for(Node elem : nodeListToList(nodes, x -> x.getNodeType() != Node.COMMENT_NODE)) {
              if (!hasOnlyTextNode(elem)) {
                  throw new EPSCommonException("The node has child nodes." + System.lineSeparator() + nodeToString(elem));
              }
              result.add(elem.getTextContent());
          }
  
          return result;
      }
focal_method.class_method_signature: XMLUtil.getListByXPath(String content, String xpath)
focal_method.full_signature: @Description("Returns a list values by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to list<br>" + "Example:<br/>" + "#{getListByXPath(content, xpath)}") @UtilityMethod public List<String> getListByXPath(String content, String xpath)
focal_method.identifier: getListByXPath
focal_method.invocations: getNodesByXPath getLength emptyList nodeListToList getNodeType hasOnlyTextNode lineSeparator nodeToString add getTextContent
focal_method.modifiers: @Description("Returns a list values by xpath.<br>" + "<b>content</b> - xml document<br>" + "<b>xpath</b> - path to list<br>" + "Example:<br/>" + "#{getListByXPath(content, xpath)}") @UtilityMethod public
focal_method.parameters: (String content, String xpath)
focal_method.return: List<String>
focal_method.signature: List<String> getListByXPath(String content, String xpath)