Javatpoint Logo
Javatpoint Logo

JSTL XML tags

The JSTL XML tags are used for providing a JSP-centric way of manipulating and creating XML documents.

The xml tags provide flow control, transformation etc. The url for the xml tags is http://java.sun.com/jsp/jstl/xml and prefix is x. The JSTL XML tag library has custom tags used for interacting with XML data. The syntax used for including JSTL XML tags library in your JSP is:

Before you proceed further with the examples, you need to copy the two XML and XPath related libraries into the <Tomcat Installation Directory>\lib:

Xalan.jar: Download this jar file from the link:

XercesImpl.jar: Download this jar file from the link:

JSTL XML tags List

XML Tags Descriptions
x:out Similar to <%= ... > tag, but for XPath expressions.
x:parse It is used for parse the XML data specified either in the tag body or an attribute.
x:set It is used to sets a variable to the value of an XPath expression.
x:choose It is a conditional tag that establish a context for mutually exclusive conditional operations.
x:when It is a subtag of that will include its body if the condition evaluated be 'true'.
x:otherwise It is subtag of that follows tags and runs only if all the prior conditions evaluated be 'false'.
x:if It is used for evaluating the test XPath expression and if it is true, it will processes its body content.
x:transform It is used in a XML document for providing the XSL(Extensible Stylesheet Language) transformation.
x:param It is used along with the transform tag for setting the parameter in the XSLT style sheet.
Next TopicJSTL x:out tag





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA