Mega Code Archive

 
Categories / Java Tutorial / JSTL
 

Output XML with Select Statement

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/xml"  prefix="x" %> <html>   <head>     <title>xml actions</title>   </head>   <body>     This example embeds stuff...     <p/>     <c:set var="someXML">       <person>         <name>Ruth</name>         <age>29</age>       </person>     </c:set>     <x:parse var="parsedDocument" xml="${someXML}" />     <x:out select="$parsedDocument/*" />    </body> </html>