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:
parent
3529f11cc2
commit
3ca390678d
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user