fix warnings under -w when parsing an xml file

->contents also returns a status code when called in list context