Collections.sort(layerNames);
Representation representation;
if (extension.equalsIgnoreCase("xml")) {
representation = new XstreamRepresentation(layerNames);
representation.setCharacterSet(CharacterSet.UTF_8);
final XStream xStream = ((XstreamRepresentation) representation).getXStream();
xStream.alias("layers", List.class);