periodic_table.jsp

来自「jakarta-taglibs」· JSP 代码 · 共 34 行

JSP
34
字号
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0" prefix="xtags" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Periodic Table Demo</title>
<link rel="stylesheet" href="examples.css" type="text/css">
</head>
<body>

<h1>Periodic Table Demo</h1>

<p>This example demonstrates the direct use of the XPath tag library to format an XML document.</p>


<xtags:parse uri="/periodic_table.xml"/>

<xtags:forEach select="//ATOM">

  <h2><xtags:valueOf select="NAME"/> : <xtags:valueOf select="SYMBOL"/></h2>

  <p>
    The atom has an atomic weight of 
    <b> <xtags:valueOf select="ATOMIC_WEIGHT"/> </b>

    and a boiling point of 
    <b> <xtags:valueOf select="BOILING_POINT"/> </b>
    <xtags:valueOf select="BOILING_POINT/@UNITS"/> 
  </p>
</xtags:forEach>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?