Rewrite xml reader using tinyxml2.

Rewrite xml reader using tinyxml2 to reduce memory using.