You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Detlef Brendle <de...@canoo.com> on 2002/12/05 10:44:56 UTC

XML Property handling lists

Hi,
I would like to use the xmlProperty task to load a list of elements into my
project.
The list looks something like:

A=hello
A.do=true
B=world
B.do=false
C=foo
C.do=true
D=bar
D.do=true
...

The list is static.

How would the XML file look like to load this in my project ?

detlef


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XML Property handling lists

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Detlef Brendle wrote:
> Hi,
> I would like to use the xmlProperty task to load a list of elements into my
> project.
> The list looks something like:
> 
> A=hello
> A.do=true
> B=world
> B.do=false
> C=foo
> C.do=true
> D=bar
> D.do=true
> ...
> 
> The list is static.
> 
> How would the XML file look like to load this in my project ?

<properties>
   <A do="true">hello</A>
   <B do="false">world</B>
   <C do="true">bar</C>
   <C do="true">bar</C>
   ...

</properties>

IIRC you have to set the collapseAttributes="true" and not set the root 
node to be part of the property name.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>