code: public static String serializeList(List<?> list) {
          if (list == null) {
              list = new ArrayList<String>();
          }
          XStream xstream = new XStream(new DomDriver());
          return xstream.toXML(list);
      }
docs: Serializes a List to XML. If the list is either empty or null
  the XML will indicate an empty list.
  
  @param list
  @return