I have a XML file same this
<devices> <device name="Cabina" altid="e2" id="42" category="3" subcategory="0" room="3" parent="40" status="1" state="-1" comment=""/> <device name="contatto finestra cucina" altid="12" id="28" category="4" subcategory="3" room="1" parent="1" armed="0" tripped="1" lasttrip="1398337234" batterylevel="1" heatsp="19" status="1"/> <device name="Ingresso" altid="e1" id="15" category="3" subcategory="0" room="1" parent="14" status="0" state="-1" comment=""/> </devices>
I want to sum a status devices only if they belong to category 3
In this case the sum = 1
Thanks
No comments:
Post a Comment