JSP JSTL < x: set > tag: save XML node
•
Java
Example
<%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <c:import url="bookInfo.xml" var="xmlFile" charEncoding="gbk"/> <x:parse var="bookInfo" doc="${xmlFile}"></x:parse> <x:set var="book" select="$bookInfo/books/book"/> 书名:<x:out select="$book/name" escapeXml="true"/><br> 出版社:<x:out select="$book/publish/@value"/><br> 单价:<x:out select="$book/price/@value"/>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码