0
我正在使用smooks庫進行XML轉換。以下是smooks配置。在freemarker模板中,我想訪問jdk庫類以及我在項目中創建的類。請讓我知道我能做到這一點。如何訪問Freemarker模板中的java庫類
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:core="http://www.milyn.org/xsd/smooks/smooks-core-1.3.xsd"
xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd">
<core:filterSettings type="SAX" defaultSerialization="false" />
<resource-config selector="Order">
<resource>org.milyn.delivery.DomModelCreator</resource>
</resource-config>
<ftl:freemarker applyOnElement="Order">
<ftl:template>
<!--
<#assign x="${Order.OrderLines.OrderLine[0][email protected]}">
<order requestNumber="${[email protected]}"
customerEmail="${[email protected]}"
orderNumber="${[email protected]}"
dateTimePlaced="${[email protected]}"
shipNodeID="${[email protected]}"
<#if x == "S2H" >
deliveryType="SHIPTOHOME"
</#if>
>
</order>-->
</ftl:template>
</ftl:freemarker>
</smooks-resource-list>