fixed handling exceptions thrown from constructor (added xml escaping for methods, constructor methods look like <init>)