Condition condition2 = new Condition();
condition2.setName("条件标题2");
condition2.setContent("条件内容2");
DataControlXML bean = new DataControlXML();
bean.getItems().add(condition);
bean.getItems().add(condition2);
JAXBContext jaxbContext = JAXBContext.newInstance(DataControlXML.class);
Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
// output pretty printed
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);