JSP Parsing using the DOM and JSTL : XML « JSP « Java

JSP Parsing using the DOM and JSTL



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

  <head><title>Parsing using the DOM and JSTL</title></head>
    <c:import url="http://localhost:8080/chapter11/people.xml"
              var="personXml" />
    <x:parse xml="${personXml}" varDom="parsedXml" />

    <h1>List of people</h1>
    <table border="1">

      <x:forEach select="$parsedXml/people/person" var="currentPerson">
        <x:forEach select="*">
          <td><x:out select="." /></td>


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 and SAX
10.JSP Displaying a Subset in XML
11.JSP XML and XSLT transform
12.JSP List of data in the XML document
13.Deal With XML In JSP