Class XmlUtils

java.lang.Object
com.intuit.karate.XmlUtils

public class XmlUtils extends Object
Author:
pthomas3
  • Method Details

    • toString

      public static String toString(Node node)
    • toString

      public static String toString(Node node, boolean pretty)
    • toXmlDoc

      public static Document toXmlDoc(String xml)
    • toXmlDoc

      public static Document toXmlDoc(String xml, boolean namespaceAware)
    • getNodeListByPath

      public static NodeList getNodeListByPath(Node node, String path)
    • stripNameSpacePrefixes

      public static String stripNameSpacePrefixes(String path)
    • getNodeByPath

      public static Node getNodeByPath(Node node, String path, boolean create)
    • createNodeByPath

      public static Node createNodeByPath(Document doc, String path)
    • getTextValueByPath

      public static String getTextValueByPath(Node node, String path)
    • setByPath

      public static void setByPath(Node doc, String path, String value)
    • removeByPath

      public static void removeByPath(Document doc, String path)
    • setByPath

      public static void setByPath(Document doc, String path, Node in)
    • toJsonDoc

      public static com.jayway.jsonpath.DocumentContext toJsonDoc(Node node)
    • getChildElementCount

      public static int getChildElementCount(Node node)
    • toObject

      public static Object toObject(Node node)
    • toObject

      public static Object toObject(Node node, boolean removeNamespace)
    • fromMap

      public static Document fromMap(Map<String,Object> map)
    • fromObject

      public static Document fromObject(String name, Object o)
    • fromObject

      public static List<Element> fromObject(Document doc, String name, Object o)
    • newDocument

      public static Document newDocument()
    • addAttributes

      public static void addAttributes(Element element, Map<String,Object> map)
    • createElement

      public static Element createElement(Node node, String name, String value, Map<String,Object> attributes)
    • toNewDocument

      public static Document toNewDocument(Node in)
    • fromJavaObject

      public static Document fromJavaObject(Object o)
    • toXml

      public static String toXml(Object o)
    • isXml

      public static boolean isXml(String s)