XML parsing fails
"Trenton D. Adams" <[email protected]>
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
The following JSP fails. Is there something basic that would be causing
the error "javax.servlet.jsp.JspException: Content is not allowed in
prolog"???
FYI: Note that I'm pointing to a valid XML document on the W3C site. I
also create my own, making sure no characters of any kind exist before
the xml starting directive.
<%--
Created by IntelliJ IDEA.
User: trenta
Date: 19-Jul-2007
Time: 6:53:18 PM
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head><title>Simple jsp page</title></head>
<body>
<!-- parse an XML document -->
<c:import url="http://www.w3schools.com/xml/note.xml" var="xml"/>
<x:parse doc="${xml}" var="doc"/>
</body>
</html>