1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ taglib prefix="ex" uri="/jstl-examples-taglib" %>
<html>
<head>
<title>JSTL: XML Support -- Parse / Filter / Out</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Parse / Filter / Out</h3>
<ex:SPath var="spath" select="//a"/>
<x:parse var="a" filter="${spath}">
<nope>
<a>
<b>
<c>
foo
</c>
</b>
<d>
bar
</d>
</a>
</nope>
</x:parse>
<x:out select="$a//c"/>
<x:out select="$a/a/d"/>
<hr />
</body>
</html>
|