This Function use to escape the characters that interpreted as XML markup Language.
In this Program first we declare the syntax of function library. After then we declare the variable as per condition the other hand the function used in this program will escape the characters that interprets under xml. After declaring the variables we put the function syntax that will use to execute on the web browser. At last we close all the custom or html tags.
fn:escapeXML.jsp
<%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefix=”c” %>
<%@ taglib uri=”http://java.sun.com/jsp/jstl/functions” prefix=”fn” %>
<html>
<head>
<title><fn:escapeXML> In JSTL</title>
</head>
<body>
<c:set var=”str” value=”This is Example of <b>Java Server Pages</b> escapeXML Function In JSTL.”></c:set>
<center><p><br />Without escapeXml function : ${str}
<br/>
<center><p><br />With escapeXml function : ${fn:escapeXml(str)}
</body>
</html>