List of usage examples for weka.core.xml XStream serialize
public static String serialize(Object toSerialize) throws Exception
From source file:de.upb.timok.utils.IoUtils.java
License:Open Source License
public static void xmlSerialize(Object o, Path path) { String xml;/* w w w . java 2s .c om*/ try { xml = XStream.serialize(o); Files.write(path, xml.getBytes()); } catch (final Exception e) { logger.error("Unexpected exception", e); } }