Optimize xmlParser

This increases the indexing speed by ~12%