package parserCodereview; import java.util.ArrayList; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; //This statement means that class "Bookstore.java" is the root-element of our example @XmlRootElement(namespace = "parserCodereviewXX") public class ErrorList { // XmLElementWrapper generates a wrapper element around XML representation @XmlElementWrapper(name = "errorList") // XmlElement sets the name of the entities @XmlElement(name = "error") private ArrayList errorList; public void setErrorList(ArrayList errorList) { this.errorList = errorList; } public ArrayList getErrorsList() { return errorList; } }