Result result = new StreamResult(writer);
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
if (c == -1) {
String versionInfo = writer.toString();
XStream xstream = new XStream(new DomDriver());
String serializationVersion = (String)xstream.fromXML(versionInfo);
if (!serializationVersion.equals(SERIALIZATION_VERSION)) {
throw new AggDesignerException(Messages.getString("SerializationService.UnrecognizedVersion", SERIALIZATION_VERSION, serializationVersion));
}
c++;