Optimalization for XML parser