Internal implementation of XML pull parser