// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import java.beans.XMLDecoder;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class LoadXMLDec {
    public static void main(String[] args) {
        try {
            XMLDecoder xd = new XMLDecoder(new FileInputStream("C:\\xmlencdec.xml"));
            Data o = (Data)xd.readObject();
            xd.close();
            System.out.println(o.getIv() + " " + o.getXv() + " " + o.getSv());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
