// Path: src/xml/GeradorXml.java
// public class GeradorXml {
// 	Object obj;
// 	
// 	public GeradorXml(Object obj){
// 		this.obj = obj;
// 		
// 	}
// 	
// 	public String makeXml(){
// 		XStream xstream = new XStream();
// 		return  xstream.toXML(this.obj);	
// 	}
// 	
// }


import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.Path;
import com.thoughtworks.xstream.XStream;
import xml.GeradorXml;
package arquivo;


/*
 * ReaderXml: Classe responsavel por manipulacao de leitura do arquivo fixo "
 */

public class ManipulateXml extends ConciliacaoFiles {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public ManipulateXml(Path path) {
		super(path);
		//Efetua a leitura do arquivo config.xml dentro da pasta do arquivo JAR (executavel deste projeto)
		//Path path = FileSystems.getDefault().getPath(System.getProperty("user.dir") , fileName);
	}

	public Object openXml() throws FileNotFoundException {
		return new XStream().fromXML(this.openFileStream());
	}
	
	public void saveXml(Object o) throws IOException{
// Path: src/xml/GeradorXml.java
// public class GeradorXml {
// 	Object obj;
// 	
// 	public GeradorXml(Object obj){
// 		this.obj = obj;
// 		
// 	}
// 	
// 	public String makeXml(){
// 		XStream xstream = new XStream();
// 		return  xstream.toXML(this.obj);	
// 	}
// 	
// }


// Path: src/arquivo/ManipulateXml.java
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.Path;
import com.thoughtworks.xstream.XStream;
import xml.GeradorXml;

package arquivo;


/*
 * ReaderXml: Classe responsavel por manipulacao de leitura do arquivo fixo "
 */

public class ManipulateXml extends ConciliacaoFiles {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public ManipulateXml(Path path) {
		super(path);
		//Efetua a leitura do arquivo config.xml dentro da pasta do arquivo JAR (executavel deste projeto)
		//Path path = FileSystems.getDefault().getPath(System.getProperty("user.dir") , fileName);
	}

	public Object openXml() throws FileNotFoundException {
		return new XStream().fromXML(this.openFileStream());
	}
	
	public void saveXml(Object o) throws IOException{
		this.saveFile(new GeradorXml(o).makeXml(), false);