Please, help me find an example of how to perform sorting in XPath a query when i work with XML file. I found a description example XPath query with SORT for Java in intrnet, but it does not work in B4A.
Example XML file
I need to get a list of "comp" sorted by "rating". Example code not work in B4A
Example XML file
B4X:
<?xml version="1.0"?>
<dataroot>
<comp nam="QQQQ">
<rating>12</rating>
</comp>
<comp nam="eeee">
<rating>8</rating>
</comp>
<comp nam="ssss">
<rating>21</rating>
</comp>
</dataroot>
B4X:
strQuery="//comp order by /rating"
xomCompanys=xomRootDoc.Query(strQuery)
Last edited: