Given the following XML file:
<?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>
and the following JSTL fragment where the xml has been loaded into the variable 'file':
<x:parse var="xml" doc="${file}"/>
<x:out select="$xml//body"/>
I am hoping to get:
<h1>Heading</h1>
<p>Lorem ipsum dolor sit amet.</p>
<p>Donec sed enim.</p>
But am getting:
Heading Lorem ipsum dolor sit amet. Donec sed enim.
Notice, no tags. How would I go about getting JSTL to leave the tags in the result?