Handle malformed XML