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;
 }
 

When not set, the defaults for amount and offset are -1, which means that all results will be retrieved. The default depth is 0, which means that ids of associated objects are retrieved, but not the associated objects themselves.

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

Since:
Mendix 7.17