Hi all
I try to fetch value form XQ_getXPath
But I cannot assign XQ_getXPath to a content part.
This is how I proceded:
var inputPart = XQMessage.getPart(inPart);
var indexInputPart=getPartIndex(inPart);
var xpathNode=XQ_getXPath(xpath,indexInputPart);
XQ_logInformation(xpathNode.enumerate().nextElement().textContent);
var part=XQMessage.createPart();
part.setContentId(outPart);
part.setContent(xpathNode.enumerate().nextElement().textContent,"text/xml");
XQMessage.addPart(part);
I return no value with xpathNode.enumerate().nextElement().textContent
Any idea?
Ciao
Giovanni
The xpath evaluation is probably returning nodes as java objects. You need to convert it to a string. The easiest way is to let the path evaluation return strings by using the string() function. Instead of using xpath = /*[1] use xpath = string(/*[1])