checking odd parity with xor
During transmission : Compute the XOR of all bits of the word to be transmitted. The value computed indicates if the number of '1' is even (takes the value '0') or odd (takes the value '1'). If you want to have even/odd parity, take the XOR of the above value with '0'/'1' respectively. The final bit computed can be transmitted as the parity bit of the uart word.
During reception : Do the same as above and compare the bit calculated with the parity bit received from the RX line. If they differ, then you have detected an error in the transmission. If they are equal, then this means either that no error occurred or that an even amount of bits have been flipped.