layersEl.setAttribute("active", Integer.toString(active+1));
}
root.appendChild(layersEl);
for (int index=0; index<layers.size(); ++index) {
Layer layer = layers.get(index);
SessionLayerExporter exporter = exporters.get(layer);
ExportSupport support = new ExportSupport(doc, index+1);
Element el = exporter.export(support);
el.setAttribute("index", Integer.toString(index+1));
el.setAttribute("name", layer.getName());
el.setAttribute("visible", Boolean.toString(layer.isVisible()));
if (layer.getOpacity() != 1.0) {
el.setAttribute("opacity", Double.toString(layer.getOpacity()));
}
Set<Layer> deps = dependencies.get(layer);
if (deps != null && !deps.isEmpty()) {
List<Integer> depsInt = new ArrayList<>();
for (Layer depLayer : deps) {