The QueryXML and QueryLocalXML functions are very good.
But they have just a little problem: it returns a result listed in alphabetically order.

And that's a big problem for me.
I'll show why!

Please, look the normal result for a hypothetical search with -listxml:


To show that information, I create a function:
      if (qmc2NEO.queryLocalXml("$ID$", "doc($xmlDocument)//machine/chip/@name/string()")) 
         var result = qmc2NEO.getXmlResult(); 
         var len = result.length;        

         qmc2NEO.queryLocalXml("$ID$", "doc($xmlDocument)//machine/chip/@tag/string()");  
         var tag = qmc2NEO.getXmlResult();      
         qmc2NEO.queryLocalXml("$ID$", "doc($xmlDocument)//machine/chip/@type/string()");  
         var type = qmc2NEO.getXmlResult();
         qmc2NEO.queryLocalXml("$ID$", "doc($xmlDocument)//machine/chip/@clock/string()");
         var clock = qmc2NEO.getXmlResult(); 
         document.write("<td max-width=\"25%\" align=\"center\"><b><u>"+len+" "+tr('PROCESSORS')+": </u></b>"); 
         if (len > 0) 
            var i=0;
   				  while (i<len)
					     document.write("<br><b>"+tag[i]+" ("+type[i]+"):</b> "+result[i]);
					     if (clock[i])
					        c = (clock[i] / 1048576);
					        document.write(" ("+c+" MHz)");
				    document.write("<td max-width=\"25%\" align=\"center\"><br><b>"+tr('PROCESSORS')+": </b>"+tr('None')+"</td>");                    
         document.write(tr('XML query error!'));

As you can see, it only get the length of the processors and, assuming that the result will come in the same order from -listxml it will draw in the screen.
But unfortunatelly, qmc2NEO.queryLocalXml combined with qmc2NEO.getXmlResult will sort every value in the own alphabetical order, and mess up with the order, and draw a weird result, as you can see in the next photo:

Probably, these functions are doing any sorting to list in alphabetical order. That surely takes some performance, but the problem with the order it's big too.
I don't know if this a Query problem from Qt itself, but if there way to solve this problem, be creating a new function or modifing the existent, surely that will be very welcome and this problem can be solved wink

"A user interface is like a joke. If you have to explain it, it's not that good."