Retrieve data by xpath using java action mendix

0
Hi, I have a java action. Now i want to retrieve list of student objects using java action. i have the xpath as a string. Could some one please help me how can i do it in java. Any related documentation would be helpful. Thanks in advance
asked
2 answers
3

Take a look at the XPathQuery interface, it even gives an example.

 

https://apidocs.rnd.mendix.com/10/runtime/com/mendix/datastorage/XPathQuery.html

 

     List<IMendixObject> results = core.createXPathQuery("//Entity[attribute=$value]")
         .setVariable("value", 1)
         .setAmount(500)
         .setOffset(50)
         .setDepth(1)
         .execute(context);

 

answered
0

Hey,

 

To retrieve xpath in Java action you should follow Mendix Client documentation (be aware there are diferent client api based of your mendix version). Link is for Mendix version 10 but in your case you should search for Mendix version 9

 

https://apidocs.rnd.mendix.com/10/runtime/com/mendix/datastorage/XPathQuery.html

answered