You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Rebhan, Gilbert" <Gi...@huk-coburg.de> on 2006/02/03 15:02:54 UTC
Solved : replace < with < in property ??
Hi, Jacob
thanks for your suggestion, i also thought of that,
but i didn't work either, as the guys creating the
xmlpropertyfile are using jdom for xmloutput.
seems like jdom automatically writes < for < and
> for > so it get's
<![CDATA[<bla>foobar</bla>]]>
which doesn't work.
But finally i solved it with =
switching back to old format, so the xmlproperty i get
from the webapp looks like =
<myprop><bla>foobar</bla></myprop>
then echo all properties i want in my mail to a file
with
<echo file="${ant.working.dir}/infomail.html"><![CDATA[
<html><body>
... a lot of <p> and <br> for formatting
</body></html> ]]>
and later in mail task i use messagemimetype="text/html"
Before i had a file in simple txtformat and no messagemimetype
so automatically text/plain was used.
Now all my tags appear as < and > in mailbody
Regards, Gilbert
-----Original Message-----
From: Jakob Fix [mailto:jakob.fix@gmail.com]
Sent: Friday, February 03, 2006 10:45 AM
To: Ant Users List
Subject: Re: replace < with < in property ??
Gilbert,
[jumping into this discussion a bit late]
On 03/02/06, Rebhan, Gilbert <Gi...@huk-coburg.de> wrote:
> Background = users write some instructions
> for Websphere admins in a text field of a webform.
> Often the instructions contain some xml snippets for
> editing configfiles.
> All the input of the webform is put into a xmlpropertyfile,
> so xmltags have to be masked - right now with < and >
> (as usual) to get a wellformed xmlpropertyfile.
wouldn't it be possible to put the data in an unparsed <![CDATA[ ]]>
section inside you xmlproperty file, rather than "masking" the special
characters?
I haven't tested this, though. In general, converting xml by hand or
regexp should be avoided and be done by the parser.
--
cheers,
Jakob.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org