thanks for reply, I used xmlproperty, now I am trying to extract url from
psf.project.reference

<psf>
  <project reference="v1.0,http://blahblahblah1,desc1"/>
  <project reference="v1.1,http://blahblahblah2,desc2"/>
  <project reference="v1.2,http://blahblahblah3,desc3"/>
</psf>

<for list="${psf.project.reference}" param="ref">
             <sequential>
                    <propertyregex property="url" input="@{ref}"
regexp="(http)(.*)" select="\0"/>
                <echo>${url}</echo>
        </sequential>
</for>
The above code doesn't work properly, please advice. Is there a better way
to do it?

Thanks


Jan.Materne wrote:
> 
> You could try <xmlproperty>.
> 
> The solution which costs the most time is creating a XSLT which transforms
> that xml into a property file. Then just load that generated property
> file.
> 
> 
> Jan 
> 
>>-----Ursprüngliche Nachricht-----
>>Von: canadatom [mailto:tomoodes...@gmail.com] 
>>Gesendet: Donnerstag, 25. Februar 2010 16:30
>>An: user@ant.apache.org
>>Betreff: Ant xmlproperty question
>>
>>
>>Hi all, I am new to ant, here is a simple task I want to do:
>>using xml to parse a xml and get a certain attribute off the xml.
>>
>>example xml
>>[code]
>><psf>
>>  <project reference="v1.0,http://blahblahblah1,desc1"/>
>>  <project reference="v1.1,http://blahblahblah2,desc2"/>
>>  <project reference="v1.2,http://blahblahblah3,desc3"/>
>></psf>
>>[/code]
>>
>>How can I echo a list of project reference? 
>>thanks for helping
>>-- 
>>View this message in context: 
>>http://old.nabble.com/Ant-xmlproperty-question-tp27714461p27714461.html
>>Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>>For additional commands, e-mail: user-h...@ant.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Ant-xmlproperty-question-tp27714461p27719078.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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

Reply via email to