public String createScriptAssertionForExists(XPathData xpathData) {
String script = "import com.eviware.soapui.support.XmlHolder\n\n"
+ "def holder = new XmlHolder( messageExchange.responseContentAsXml )\n";
StringToStringMap nsMap = xpathData.getNamespaceMap();
for (String ns : nsMap.keySet()) {
script += "holder.namespaces[\"" + nsMap.get(ns) + "\"] = \"" + ns + "\"\n";
}
script += "def node = holder.getDomNode( \"" + xpathData.getPath() + "\" )\n";
script += "\nassert node != null\n";