<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<html>
<head>
  <title>JSTL:x:parse的使用</title>
</head>
<body bgcolor="#FFFFFF">
<c:set var="xmlText">
  <a>
   <b>
    <c>
     test1
    </c>
   </b>
   <d>
     test2
   </d>
  </a>
</c:set>
<x:parse var="myxml" xml="${xmlText}" />
<x:out select="$myxml/a/b/c"/>
<x:out select="$myxml//d"/>
<x:parse var="bookxml">
  <books>
     <book id="01">
        <name>jsp 应用开发详解</name>
        <price>59</price>
     </book>
  </books>
</x:parse>
<x:out select="$bookxml/books//name"/>
</body>
</html>
