1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 00:15:02 -04:00

readXml helper function

This commit is contained in:
Reinhard Pointner 2016-08-10 17:53:52 +08:00
parent 3529f11cc2
commit 3ca390678d

View File

@ -14,6 +14,7 @@ import java.util.regex.Pattern;
import java.util.stream.Stream;
import groovy.lang.Closure;
import groovy.util.XmlSlurper;
/**
* Global functions available in the {@link ExpressionFormat}
@ -72,4 +73,8 @@ public class ExpressionFormatFunctions {
return streamLines(new File(path)).collect(toList());
}
public static Object readXml(String path) throws Exception {
return new XmlSlurper().parse(new File(path));
}
}