XML backend: Fix shift value not correctly read back from XML

The function to read the "format" attribute was expecting the "&gt;"
token to be used, but libxml already converts that back to the '>'
symbol.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Fix masking of the upper bits when converting samples from HW format

The previous algorithm wasn't correct, and a working version already
existed in the iio_channel_convert_inverse function.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>