tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Digby <li...@digby.net>
Subject x:out strips tags within selected node
Date Sat, 04 Sep 2004 00:13:30 GMT
Hi,

I've got a very simple JSP which parses an xml document containing some 
html. The problem is that when I try and output the html part, all the 
tags within it are removed. Example code and result below (I just want 
the <body> section in my output).

I suppose this is expected behaviour, but is there anything I can do to 
output all the tags.

Thanks in advance,

Digby

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>

JSP:
<c:import var="page" url="/pages/index.xml"/>
<x:parse var="xml" xml="${page}"/>
<x:set var="body" select="$xml//body"/>
<x:out select="$body"/>

result:
Heading Lorem ipsum dolor sit amet. Donec sed enim. [with no tags]


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message