ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Prentice <prent...@cisco.com>
Subject Re: problems with output containing CDATA sections when using XmlLogger
Date Tue, 14 Jan 2003 17:55:06 GMT
Sorry about replying to my reply, but to answer your question; yes, 
simply replacing the ']' characters with &#x5d; would be enough. I have 
tested this and it works fine.

Also, I tested replacing the call to encodedata with encode and it 
produces valid XML as well. However, I am not sure if there are any 
adverse effects.

-Steve

Steve Prentice wrote:

> org.apache.tools.ant.util.DOMElementWriter has the proper encode 
> method, but it doesn't use it for writing CDATA sections. It uses a 
> method called encodedata, which drops illegal characters, but does not 
> encode the data. I think that reusing the encode method to encode 
> CDATA sections would work just fine. The encodedata method could then 
> be removed. Thoughts?
>
> Stefan Bodewig wrote:
>
>> On Mon, 13 Jan 2003, Steve Prentice <prentice@cisco.com> wrote:
>>
>>> This is occuring because my build output contains <!CDATA[[ ]]>
>>> sections that are not being escaped (encoded) before being added to
>>> the log document.  
>>
>> Should be fixed.  What would be the proper escaping encoding here,
>> would replacing the ] characters with &#x5d; be enough?
>


--
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