You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Vijay Prasanna <vi...@leadingc.com> on 2004/01/14 21:57:24 UTC

xmlproperty task

Hi,
         I'm trying to load a xml file containing properties, using 'xmlproperty' task,  the ant script  is

        <xmlproperty file = "C:\xmlprop.xml" keeproot = "false"/>
        <echo message = "${javapath}"/>
       The contents of xmlprop.xml file is 
         
 <xml version="1.0">
   <properties>
   <OSVersion>WIN2000</OSVersion>
   <unixpath>/export/cvsroot</unixpath>
   <javapath>E:\j2sdk1.4.2_03\bin</javapath>
   </properties>
</xml>  
                  but the ant output is       [echo] ${javapath}.    where am i wrong.

vijay



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: xmlproperty task

Posted by Will Lopez <wi...@eds.com>.
..not tested but I believe if you turn on the *semanticAttributes 
*attribute it turns on property reference resolution.
Try this:

<xmlproperty file="C:\xmlprop.xml" keeproot="false"
	     semanticAttributes="true" />



Vijay Prasanna wrote:

>Hi,
>         I'm trying to load a xml file containing properties, using 'xmlproperty' task,  the ant script  is
>
>        <xmlproperty file = "C:\xmlprop.xml" keeproot = "false"/>
>        <echo message = "${javapath}"/>
>       The contents of xmlprop.xml file is 
>         
> <xml version="1.0">
>   <properties>
>   <OSVersion>WIN2000</OSVersion>
>   <unixpath>/export/cvsroot</unixpath>
>   <javapath>E:\j2sdk1.4.2_03\bin</javapath>
>   </properties>
></xml>  
>                  but the ant output is       [echo] ${javapath}.    where am i wrong.
>
>vijay
>
>
>
>---------------------------------------------------------------------
>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