use of org.apache.commons.digester3.Digester in project hudson-2.x by hudson.
the class ExtractChangeLogParser method parse.
public ExtractChangeLogSet parse(AbstractBuild build, InputStream changeLogStream) throws IOException, SAXException {
ArrayList<ExtractChangeLogEntry> changeLog = new ArrayList<ExtractChangeLogEntry>();
Digester digester = new Digester();
digester.setClassLoader(ExtractChangeLogSet.class.getClassLoader());
digester.push(changeLog);
digester.addObjectCreate("*/extractChanges/entry", ExtractChangeLogEntry.class);
digester.addBeanPropertySetter("*/extractChanges/entry/zipFile");
digester.addObjectCreate("*/extractChanges/entry/file", FileInZip.class);
digester.addBeanPropertySetter("*/extractChanges/entry/file/fileName");
digester.addSetNext("*/extractChanges/entry/file", "addFile");
digester.addSetNext("*/extractChanges/entry", "add");
digester.parse(changeLogStream);
return new ExtractChangeLogSet(build, changeLog);
}
use of org.apache.commons.digester3.Digester in project ocvn by devgateway.
the class XMLFileImport method process.
@Async
public void process(final InputStream inputStream) throws IOException, SAXException {
DigesterLoader digesterLoader = DigesterLoader.newLoader(getAbstractRulesModule());
Digester digester = digesterLoader.newDigester();
// Push this object onto Digester's stack to handle object save operation (call saveRelease method)
digester.push(this);
digester.parse(inputStream);
}
Aggregations