ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Using Java xml properties file with Ant
Date Fri, 20 Jul 2007 15:30:46 GMT
>Good question.  Looking at the ant source it looks like the 
>property value is overwritten with the new value concatenated 
>onto the old value with a comma in between.  So the old value is lost.
>This is probably not the answer you are looking for but you 
>could use ant contrib's foreach task to iterate over the list 
>of values in
>It would be nice if there were a way for the xmlproperty task 
>to create props with an XPath like syntax.  Something like:
>"appName")  would return Name
>or even a simple array index, something like:
>  would return Name as well
>But I don't see such a thing.  Maybe we are just missing it.

Without having a look into the source I dont think that you missed

Have a look at this XML

   <entry one="foo1" two="foo2" three="foo3">foo-text</entry>
   <entry one="bar1" two="bar2" three="bar3">bar-text</entry>

What is the key? What is the data?
I could think that something like this could be useful:

<xmlproperty file="" prefix="A" key="two" data="three"/>
<xmlproperty file="" prefix="B" key="one" />

You specify the key and the data attributes and get the "hashmap".
Without specifying
the data attribute it defaults to the text().


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message