changed xml handler Deque to Stack for android compatibility