我一直在阅读 BeanIO 的模板部分,但我没有找到任何特定于带有模板的外部文件的内容。基本上,我正在尝试创建一个 xml 文件,该文件将包含我的所有模板并从其他文件中引用特定模板。
我有这个文件 mytemplates.xml
<beanio>
<template name="theTemplate">
//template fields
</template>
</beanio>
我还有另一个名为 myfile.xml 的文件,它将使用 mytemplates.xml 中的模板
<beanio>
<stream name="aaa" format="fixedlength">
<include template="theTemplate"/>
</stream>
</beanio>
有没有办法做到这一点?