Fix empty selector XML bug

The XML serialization fails when it's trying to create a datum selector with no
values. In that case the obj is an empty string so the selection of datum from
it just fails.
Instead of raising an exception the fix is returning an empty string, that
allows to serialize Selector with an empty object.

Fixes bug 1223358

Change-Id: If5d564c9b037eb0a107f4688ffa1aceb5281dc42
Merge "Fix empty selector XML bug"