列印檔案的內容

要列印檔案的內容,我們可以使用 loadfile 將檔案讀入本地屬性,然後使用 echo 列印它的值。

<loadfile property="contents" srcFile="example.txt" />
<echo message="${contents}" />