Module id.xfunction
Package id.xfunction

Class Xml

Object
Xml

public class Xml extends Object
Set of functions to process XML
  • Constructor Details

    • Xml

      public Xml()
  • Method Details

    • query

      public static List<String> query(Path xml, String xpath)
      Run XPath query to a given file and return results as a list
    • query

      public static List<String> query(String xml, String xpath)
      Run XPath query to a given XML string and return results as a list
    • replace

      public static void replace(Path xml, String xpath, String value)
      Replace all elements which satisfy given XPath expression.
      Parameters:
      xml - input file where to perform the replace
      xpath - XPath expression
      value - new value to replace with
    • replace

      public static String replace(String xml, String xpath, String value)
      Replace all elements which satisfy given XPath expression.
      Parameters:
      xml - input string where to perform the replace
      xpath - XPath expression
      value - new value to replace with