xml.beginTag("BIF");
xml.beginTag("NETWORK");
xml.addProperty("NAME", "Bayes Network, Generated by Encog");
// write variables
for (BayesianEvent event : network.getEvents()) {
xml.addAttribute("TYPE", "nature");
xml.beginTag("VARIABLE");
xml.addProperty("NAME", event.getLabel());
for (BayesianChoice str : event.getChoices()) {
xml.addProperty("OUTCOME", str.getLabel());
}