Example usage for weka.core.xml XStream deSerialize

List of usage examples for weka.core.xml XStream deSerialize

Introduction

In this page you can find the example usage for weka.core.xml XStream deSerialize.

Prototype

public static Object deSerialize(String xmlString) throws Exception 

Source Link

Document

Deserializes an object from the supplied XML string

Usage

From source file:de.upb.timok.utils.IoUtils.java

License:Open Source License

public static Object xmlDeserialize(Path path) {
    try {/*from w ww.j av  a  2  s. c o  m*/
        final String xml = new String(Files.readAllBytes(path), StandardCharsets.UTF_8);
        return XStream.deSerialize(xml);
    } catch (final Exception e) {
        logger.error("Unexpected exception", e);
    }
    return null;
}