Usage:
<attribute name="name" />
<attribute name="value" />
<attribute name="file" />
<sequential>
<script language="javascript"> <![CDATA[
importPackage(javax.xml.xpath);
importPackage(java.io);
importClass(org.xml.sax.InputSource);
var xpathExp = XPathFactory.newInstance().newXPath().compile("@{value}");
var inputSource = new InputSource(new FileInputStream("@{file}"));
var prop = sfpricer.createTask("property");
prop.setName("@{name}");
prop.setValue(xpathExp.evaluate(inputSource));
prop.perform();
]]> </script>
</sequential>
</macrodef>
No comments:
Post a Comment