I also need this feature.
Couple days ago I wrote the following code:
// xQuery_2_Object can be a query to Attribute or an Element
public boolean doesObjectExists(String xQuery_2_Object, TXMLObjectAccessor accessor) {
try {
TXQuery query = TXQuery.newInstance(xQuery_2_Object);
TResponse response = accessor.xquery( query );
return response.hasQueryContent();
}
catch (TXQueryException e) {
JOptionPane.showMessageDialog(this, e, “TXQueryException”, JOptionPane.ERROR_MESSAGE);
return false;
}
}
#API-Management#webMethods#Tamino