[AM] testcases XML Parser, Refactoring, Bug fixing