chapter_006/src/main/java/ru/job4j/store/StoreXML.java
/**
     * Save enties from tables in XML.
     *
     * @param list - list of entries.
     */
Save enties from tables in XML.
@param list - list of entries.
Save enties from tables in XML . @param list - list of entries .
public void save(List<Field> list) {
        try {
            JAXBContext context = JAXBContext.newInstance(Entries.class);
            Marshaller marshaller = context.createMarshaller();
            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
            marshaller.marshal(new Entries(list), this.target);
        } catch (JAXBException e1) {
            e1.printStackTrace();
        }
    }
public void save ( List < Field > list ) { try { JAXBContext context = JAXBContext . newInstance ( Entries . class ) ; Marshaller marshaller = context . createMarshaller ( ) ; marshaller . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , Boolean . TRUE ) ; marshaller . marshal ( new Entries ( list ) , this . target ) ; } catch ( JAXBException e1 ) { e1 . printStackTrace ( ) ; } }
Save enties from tables in XML.
Save enties from tables in XML .