Fixed passing XML element and attribute with exception