Presence parsing edit + more status msges

if the parsing is bad then revert and find another way; till now when
there was empty element (<x \>) then the condition passed and next
element was read inside the switch resulting in loss of one or more
elements in presence.