import java.io.InputStream;

import javax.xml.bind.JAXBException;

import com.ichir.projects.beans.Person;
import com.ichir.projects.jaxb.XmlLoader;


public class MyMain {

	public static void main(String[] args) throws JAXBException {
		
		InputStream is = MyMain.class.getResourceAsStream("/person.xml");
		XmlLoader loader = new XmlLoader();
		loader.parse(is);
		
		Person person = loader.getPerson();
		System.out.println(person);
		
		System.out.println(">> father: "+person.getParents().getFather());
		System.out.println(">> mother: "+person.getParents().getMother());
	}
}
