Package com.intuit.karate
Class XmlUtils
- java.lang.Object
-
- com.intuit.karate.XmlUtils
-
public class XmlUtils extends Object
- Author:
- pthomas3
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddAttributes(Element element, Map<String,Object> map)static ElementcreateElement(Node node, String name, String value, Map<String,Object> attributes)static NodecreateNodeByPath(Document doc, String path)static DocumentfromJavaObject(Object o)static DocumentfromMap(Map<String,Object> map)static DocumentfromObject(String name, Object o)static List<Element>fromObject(Document doc, String name, Object o)static intgetChildElementCount(Node node)static NodegetNodeByPath(Node node, String path, boolean create)static NodeListgetNodeListByPath(Node node, String path)static StringgetTextValueByPath(Node node, String path)static booleanisXml(String s)static DocumentnewDocument()static voidremoveByPath(Document doc, String path)static voidsetByPath(Document doc, String path, Node in)static voidsetByPath(Node doc, String path, String value)static StringstripNameSpacePrefixes(String path)static com.jayway.jsonpath.DocumentContexttoJsonDoc(Node node)static DocumenttoNewDocument(Node in)static ObjecttoObject(Node node)static ObjecttoObject(Node node, boolean removeNamespace)static StringtoString(Node node)static StringtoString(Node node, boolean pretty)static StringtoXml(Object o)static DocumenttoXmlDoc(String xml)static DocumenttoXmlDoc(String xml, boolean namespaceAware)static voidtrimWhiteSpace(Node node)
-
-
-
Method Detail
-
trimWhiteSpace
public static void trimWhiteSpace(Node node)
-
toJsonDoc
public static com.jayway.jsonpath.DocumentContext toJsonDoc(Node node)
-
getChildElementCount
public static int getChildElementCount(Node node)
-
newDocument
public static Document newDocument()
-
createElement
public static Element createElement(Node node, String name, String value, Map<String,Object> attributes)
-
isXml
public static boolean isXml(String s)
-
-