ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jowie <joe.n...@mac.com>
Subject RE: RegExp help needed!
Date Mon, 07 Dec 2009 12:39:33 GMT

Hi Gilbert,

Thanks very much for taking the time to help me out. Unfortunately I've not
used Xpath before and don't really have time to learn :( but if I give you
an example of my XML, could you perhaps point me in the right direction?
Here is an example:

------
  <Question ID="531" Subject="L" Category="Punc" Presentation="PT01"
Engine="MC01" Body="test" Media="/bgmain/Image.ashx?ID=12">
    <TipID/>
    <Answers>
      <Answer ID="1457" Valid="false" Position="1"
Media="/bgmain/Image.ashx?ID=112">txt</Answer>
      <Answer ID="1458" Valid="true" Position="2"
Media="/bgmain/Image.ashx?ID=113">txt</Answer>
      <Answer ID="1459" Valid="false" Position="3"
Media="/bgmain/Image.ashx?ID=114">txt</Answer>
      <Answer ID="1460" Valid="false" Position="4"
Media="/bgmain/Image.ashx?ID=115">txt</Answer>
    </Answers>
  </Question>
-----

So from this, I need to:
1. Find any Media attribute, nested or otherwise (e.g. in E4X,
questionXML..@Media)
2. Store each of these to download them
3. Replace the values in the XML with local path equivalents, e.g.
"images/image_@{imageID}.jpg"
4. Go through stored list, download the images and put them in the right
place (I know how to do that bit with copy url)

Many thanks!

:-Joe


Rebhan, Gilbert wrote:
> 
> 
> hit the send button to soon, should be =
> 
> so you would go like that =
> 
> <xmltask source="${local.path}GetAllQuestions.xml">
>  <call path="yourxpathexpression" target="yourdownloadtarget">
>   
>    ...
>   </call>
> </xmltask>
> 
> 
> 
> 
> 
> Regards, Gilbert
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26676679.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message