We are assuming that XLR pin 2 is positive and that the tip of the 1/4" plug is also positive. Check that your devices are not wired differently. 1/4" three-contact connectors are often referred to as TRS (Tip-Ring-Sleeve), as opposed to two-contact TS (Tip-Sleeve) connectors.
Balanced to balanced
In case of hum when connecting balanced outputs to balanced inputs, it is common practice to lift (disconnect) the shield (ground) at the input connector.
Balanced XLR to balanced XLR

Balanced XLR to balanced 1/4"

Balanced 1/4" to balanced 1/4"

Balanced 1/4" to balanced XLR
Unbalanced to balanced
In general, to connect an unbalanced source to a balanced input, two of the cable conductors are joined (negative/cold and sleeve).
Unbalanced XLR to balanced XLR

Unbalanced XLR to balanced 1/4"

Unbalanced 1/4" to balanced XLR

Unbalanced 1/4" to balanced 1/4"

RCA to balanced XLR

RCA to balanced 1/4"
Related »» In-Depth Balanced and unbalanced connections