Add more robust XML parsing

* add apache library
* strip non-valid XML characters
* add catch exception