XML parser redesigned. and XmlParserErrors and exceptions added.

 compatibility of the console demo.