mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 13:55:03 -05: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 java.util.stream.Stream;
|
||||||
|
|
||||||
import groovy.lang.Closure;
|
import groovy.lang.Closure;
|
||||||
|
import groovy.util.XmlSlurper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global functions available in the {@link ExpressionFormat}
|
* Global functions available in the {@link ExpressionFormat}
|
||||||
@ -72,4 +73,8 @@ public class ExpressionFormatFunctions {
|
|||||||
return streamLines(new File(path)).collect(toList());
|
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