Hi,I'm not sure how to retrieve XML in SQL inside AC. However, you can use querydef for the same. var query= xtk.queryDef.create(<queryDef schema="xtk:workflow" operation="select"> <select> <node expr="@affinity" /> <node expr="@label" /> </select> <where> <condition expr="...