readXml helper function

This commit is contained in:
Reinhard Pointner 2016-08-10 17:53:52 +08:00
parent 3529f11cc2
commit 3ca390678d
1 changed files with 5 additions and 0 deletions

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));
}
}