Source

Texa / grails-app / services / ImportXMLService.groovy

Full commit
import grails.converters.XML
import java.io.FileInputStream

class ImportXMLService {

    boolean transactional = true

    def importFirmService
    def importClientService
    def importProjectService
    def importTodoListsService

    def importFromFile(String pathAndFilename) {

       def accountXML = XML.parse(new FileInputStream(pathAndFilename), "UTF-8")

       log.info "Importing Firm";      importFirmService.importXML(accountXML.firm)
       log.info "Importing Clients";   importClientService.importXML(accountXML.clients)
       log.info "Importing Projects";  importProjectService.importXML(accountXML.projects)
       log.info "Importing TodoLists"; importTodoListsService.importXML(accountXML.projects)

    }
}