• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)

JSTL XML Tags Library

February 27, 2014 //  by Krishna Srinivasan//  Leave a Comment

The XML tag library is used for creating and manipulating the xml data in jsp page and also transform the data used in jsp page. They are mostly used with xml documents rather then html documents.

The Syntax for the JSTL XML Tag

[code lang=”html”] <%@ taglib uri= “http//java.sun.com/jsp/jstl/xml” prefix= “x” %>
[/code]

The JSTL XML Tags

  • <x: out>: It is used to display the result of xml path expression and writes result to the jsp writer.
  • <x: parse>: It is used to parse the xml content and the result is been stored in specified variable.
  • <x: set>: It is used to store the result of xml path expression in scoped variable.
  • <x: if>: The <x: if> tag evaluates an XPath expression and if the result is true then the body of the tag is evaluated.
  • <x: forEach>: This tag is used for looping over a list of elements in an xml document.
  • <x: choose>: The x:choose tag is XML tag used for checking conditional statements.
  • <x: when>: The <x:when> tag is to check to see whether the expression evaluates to be true. This is the subtag of <x:choose> tag.
  • <x: otherwise>: This is the subtag of <x:choose> which is used with <x:when> tag. This tag includes its body when all of the conditions specified using <x:when> tags evaluated to false.
  • <x: transform>: This tag is used to transform XML data based on XSLT script.
  • <x: param>: This tag is subtag of <x:transform> tag which is used with transform tag to set a parameter in the XSLT stylesheet.

Previous Tutorial : JSTL Format fmt:requestEncoding Tag :: Next Tutorial : JSTL XML x:out Tag

Category: Java EETag: JSTL Tutorials

About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Previous Post: « JSTL Format fmt:requestEncoding Tag
Next Post: JSTL XML x:out Tag »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

np.zeros

A Complete Guide To NumPy Functions in Python For Beginners

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Introductiion to Jakarta Struts

What’s new in Struts 2.0? – Struts 2.0 Framework

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact