在jsp中使用jstl标签时出现的问题:
我的xml文件是:
==============
<?xml version="1.0" encoding="UTF-8"?>
<users>
<user id ="1">
<sex>男</sex>
<name>张三</name>
<age>xx</age>
<add>四川江油</add>
</user>
<user id = "2">
<sex>男</sex>
<name>李四</name>
<age>xx</age>
<add>四川广安</add>
</user>
<user id = "3">
<sex>男</sex>
<name>王五</name>
<age>xx</age>
<add>江西永新</add>
</user>
<user id = "4">
<sex>男</sex>
<name>刘六</name>
<age>xx</age>
<add>湖南永州</add>
</user>
</users>
===========================================
在jsp页面中使用是:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>
<html>
<head>
<title> <jstl > study</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
输出XML文件标签 x:out 用法举例:<hr>
<x:parse var="users" scope="application">
<c:import url="users.xml" charEncoding="GBK" />
</x:parse>
学生:(id=001):</br>
<x:out select="$users/user@[id=4]" /></br>
</body>
</html>
==========================
问题:通过以上使用时浏览器会报一个错误是:
org.xml.sax.SAXParseException: The element type "sex" must be terminated by the matching end-tag "</sex>".
=================================
但是我检测了好几次有那个结束的</sex>啊
请问各位大虾们 ,问题是出自哪里呢?