ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Prentice <prent...@cisco.com>
Subject problems with output containing CDATA sections when using XmlLogger
Date Tue, 14 Jan 2003 02:33:48 GMT
Hi all-

I am having a problem with the XmlLogger creating invalid XML documents. 
This is occuring because my build output contains <!CDATA[[ ]]> sections 
that are not being escaped (encoded) before being added to the log 
document. I noticed that in older versions of Ant (like 1.2) the text 
was being encoded, but this was taken out later when Ant moved to using 
the javax.xml.parsers.DocumentBuilder and org.w3c.dom.Document to build 
the XML document.

Is this a bug in Ant or should org.w3c.dom.Document.createCDATASection 
take care of this automatically (and therefore a bug in 
org.w3c.dom.Document)?

Here is an example of what happens:
<message priority="info"><![CDATA[
    - << "<webresult><exception 
classname="junit.framework.AssertionFailedError">
    
<message><![CDATA[null]]></message><stacktrace><![CDATA[junit.framework.AssertionFailedError
]]></message>

Thanks,
Steve Prentice


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message