Fixed bugs

Added throwing exception in XmlParser
Removed useless code