Updated parser for XML