View Single Post
  #1 (permalink)  
Old May 24th, 2006, 07:09 AM
azudio azudio is offline
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default XLS with XML containing JSP tags dom4j - weird!

Hi All,

Hope this is the right place to ask and somebody could help.

I've got an XML file which is similar to XHTML but also has jps tags ( c:if test="blah...") embedded. When I do my transformation I get:

org.dom4j.DocumentException: Error on line 439 of document:
The prefix "c" for element "c:if" is not bound. Nested exception: The prefix "c" for element "c:if" is not bound.
    at org.dom4j.io.SAXReader.read(SAXReader.java:482)
blah...

Below is a snippet from my method that does the conversion from a string into a Document object..

Code:
286  // Read file as a string
287  String fileAsString = FileUtils.readFileToString(mySourceFile,"utf-8");
288
289  // Convert to a Document object
290  Document srcDocument = DocumentHelper.parseText(fileAsString);

My source XML looks a little like this..
Code:
<div id="items">
    <c:if test="${not empty tariffs}">
        do something
    </c:if>
</div>
Anybody got any idea?

Many thanks,

Adam.