次の XML ファイルがあるとします。
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<head>
<title>Introduction</title>
<section>section</section>
<channel>testing/test</channel>
</head>
<body>
<h1>Heading</h1>
<p>Lorem ipsum dolor sit amet.</p>
<p>Donec sed enim.</p>
</body>
</doc>
次の JSTL フラグメントでは、xml が変数「file」にロードされています。
<x:parse var="xml" doc="${file}"/>
<x:out select="$xml//body"/>
私は得たいと思っています:
<h1>Heading</h1>
<p>Lorem ipsum dolor sit amet.</p>
<p>Donec sed enim.</p>
しかし、得ています:
Heading Lorem ipsum dolor sit amet. Donec sed enim.
注意、タグはありません。結果にタグを残すようにJSTLを取得するにはどうすればよいですか?