Interface XPathQuery

All Superinterfaces:
XPathBasicQuery, XPathQueryBase

public interface XPathQuery extends XPathQueryBase, XPathBasicQuery
Fluent API for basic or schema-based XPath queries.

Can be used to create and execute XPath queries in a fluent manner. For example:

 
 public getObjectsWithValue(IContext context, ICore core, int value) {
     List<IMendixObject> results = core.createXPathQuery("//Entity[attribute=$value]")
         .setVariable("value", 1)
         .setAmount(500)
         .setOffset(50)
         .setDepth(1)
         .execute(context);
     return results;
 }
 

After the XPath query is built up, XPathQueryBase.execute(IContext) can be called to retrieve the results.

XPath string functions contains, starts-with and ends-with do not support variables as their second argument.

Since:
Mendix 7.17