Given two regular languages $L_1$ and $L_2$ and their respective deterministic finite automaton $A_1, A_2$, I need to construct an automaton $A$ such that $L(A)=(L_1\cup L_2) - (L_1\cap L_2)$ (the symmetric difference of $L_1$ and $L_2$).
I need a formal construction of $A$, based on $A_1$ and $A_2$.
I thought about constructing one automaton for $L_1\cup L_2$, and one for $L_1^C\cup L_2^C$, and than construct their product automaton, but this is very long.
Is there an easier way?