JSP Displaying a Subset in XML : XML « JSP « Java

JSP Displaying a Subset in XML



<%@ taglib uri="http://java.sun.com/jstl/xml"  prefix="x" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<html >
    <title>Displaying a Subset</title>

    <c:import url="http://localhost:8080/chapter02/people.xml"
              var="inputDoc" />

    <x:parse  xml = "${inputDoc}"
              var = "parsedDoc" />

    Here is a list of people over the age of 45:
      <x:forEach select="$parsedDoc/people/person/name[../age > 45]"
                 var="currentName" >
        <li><x:out select="." />


Related examples in the same category

1.Using the Core XML tags
2.XML transformation
3.Performing XSL Transformations
4.JSP in pure XML generating conforming XHTML
6.XSLT in JSP 2
7.JSP Parsing using the DOM
8.JSP Parsing using JDOM
9.JSP Parsing using the DOM and JSTL
10.JSP and SAX
11.JSP XML and XSLT transform
12.JSP List of data in the XML document
13.Deal With XML In JSP