RE: RegExp help needed!

2009-12-07 Thread Jowie
Hi again Gilbert, That updated Xpath worked a treat... Thank you very much for your patience and help! :-) Hopefully that will be it now... ;-) Cheers again! :-Joe -- View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26679471.html Sent from the Ant - Users

RE: RegExp help needed!

2009-12-07 Thread Jowie
I think the problem that I have is that the @Media property isn't always set. In which case it fails when it tries to look at a node with no Media property. Can anyone think of a workaround? :-/ Thanks! -- View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p266

RE: RegExp help needed!

2009-12-07 Thread Rebhan, Gilbert
-Original Message- From: Jowie [mailto:joe.n...@mac.com] Sent: Monday, December 07, 2009 4:06 PM To: user@ant.apache.org Subject: RE: RegExp help needed! /* Hi Gilbert, What I am trying to say is... I have done exactly how you say, despite what my last message says (some weird URL

RE: RegExp help needed!

2009-12-07 Thread Jowie
Hopefully it will work this time... This is my code: and I get back: [echo] img = /brain_games_main/Image.ashx?ID=647 [echo] img = /brain_games_main/Image.ashx?ID=647 [echo] img = /brain_games_main/Image.ashx?ID=647 [echo] img = /brain_games_main/Image.ashx?ID=647 [ech

RE: RegExp help needed!

2009-12-07 Thread Jowie
Hopefully it will work this time... This is my code: img = @{img} ]]> and I get back: I get back: [echo] img = /brain_games_main/Image.ashx?ID=647 [echo] img = /brain_games_main/Image.ashx?ID=647

RE: RegExp help needed!

2009-12-07 Thread Jowie
Hi Gilbert, What I am trying to say is... I have done exactly how you say, despite what my last message says (some weird URL encoding is deleting one of my lines!) and it returns a list of repeating [echo] img = /brain_games_main/Image.ashx?ID=647 [echo] img = /brain_games_main/Image.a

RE: RegExp help needed!

2009-12-07 Thread Jowie
AGH!! I am posting another line here... I have done *exactly* what you say - that line gap is a weird mistake! But I get back a load of repeating echoes ... Cheers Jowie wrote: > > Hi Gilbert, > > Sorry my copied code was completely wrong! Have no idea why! It should > have been: > >

RE: RegExp help needed!

2009-12-07 Thread Jowie
Hi Gilbert, Sorry my copied code was completely wrong! Have no idea why! It should have been: img = @{img}

RE: RegExp help needed!

2009-12-07 Thread Jowie
Hi Gilbert, Sorry my copied code was completely wrong! Have no idea why! It should have been: img = @{img}

RE: RegExp help needed!

2009-12-07 Thread Rebhan, Gilbert
-Original Message- From: Jowie [mailto:joe.n...@mac.com] Sent: Monday, December 07, 2009 3:28 PM To: user@ant.apache.org Subject: RE: RegExp help needed! /* [...] Games\Main\ant\update_offline.xml:77: required attribute img not set But... If I do

RE: RegExp help needed!

2009-12-07 Thread Jowie
Thanks Gilbert... I have now got this... img = @{img} which returns: BUILD

RE: RegExp help needed!

2009-12-07 Thread Rebhan, Gilbert
P.S. : will hit all Media=... attributes und /Question/Answers, if you need all Media Attributes you need to use = Regards, Gilbert - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands,

RE: RegExp help needed!

2009-12-07 Thread Rebhan, Gilbert
-Original Message- From: Jowie [mailto:joe.n...@mac.com] Sent: Monday, December 07, 2009 1:40 PM To: user@ant.apache.org Subject: RE: RegExp help needed! /* txt txt txt txt - So from this, I need to: 1. Find any Media attribute, nested

RE: RegExp help needed!

2009-12-07 Thread Jowie
Okay... So back to my original request (thanks for all the help so far! :)) Here's my code so far: -

Re: RegExp help needed!

2009-12-07 Thread Jowie
Okay, So I've sorted it, but it was a weird one! One of the questions was badly formatted, and looked like this: [Media} [Media} [Media} [Media} Notice the "[Media}"... Now the weird thing is that this caused an error on a large file, but not on a s

Re: RegExp help needed!

2009-12-07 Thread Antoine Levy Lambert
Hi, uhhm, in this case maybe the error you are encountering is a disguised Out of Memory, or a bug with the XML parser. you might want to try with different JDKs. I do not know whether the xercesImpl.jar which ships with ant is actually used to parse XML files in custom tasks or whether it w

Re: RegExp help needed!

2009-12-07 Thread Jowie
Hi there, Just so you know, I created a file which was bigger than my original file as a test, and that worked fine... So I'm a bit confused as to how this XML file will not work when it is supposedly well formatted... ?? -- View this message in context: http://old.nabble.com/RegExp-help-neede

Re: RegExp help needed!

2009-12-07 Thread Jowie
Hi Antopine, Yes the XML file loads fine in a browser. I am even declaring UTF-8 at the top of the file. And when I split the file down the middle and test both halves (keeping the header of course) it works fine too. Hello, the error below would not be an ant of xmltask error. The message I

Re: RegExp help needed!

2009-12-07 Thread Antoine Levy Lambert
Hello, the error below would not be an ant of xmltask error. The message Invalid byte 3 of 3-byte UTF-8 sequence means that your XML file is not matching the UTF-8 convention. Does your XML file specify UTF-8 in the XML declaration ? Can you read your XML file using another tool than ant, fo

Re: RegExp help needed!

2009-12-07 Thread Jowie
> That looks to me like your XML is not properly encoded. I > suspect that if you use a command-line tool like xmlstarlet > it'll confoirm that by giving you a very similar error. The > below isn't size-related. Thanks for the info. If you are right, this could still be a problem because the

RE: RegExp help needed!

2009-12-07 Thread Joe Nash
> That looks to me like your XML is not properly encoded. I > suspect that if you use a command-line tool like xmlstarlet > it'll confoirm that by giving you a very similar error. The > below isn't size-related. Thanks for the info. If you are right, this could still be a problem because the X

Re: RegExp help needed!

2009-12-07 Thread Brian Agnew
That looks to me like your XML is not properly encoded. I suspect that if you use a command-line tool like xmlstarlet it'll confoirm that by giving you a very similar error. The below isn't size-related. On 07/12/2009 13:15, Jowie wrote: Doh... Looks like I have a problem using xmltask anyway

RE: RegExp help needed!

2009-12-07 Thread Jowie
Doh... Looks like I have a problem using xmltask anyway unfortunately... The GetAllQuestions.xml is too big for it to handle :-( it's nearly 1MB in size. At least I'm pretty sure that's why, since if I run another piece of XML which is a lot smaller it works fine. But in this case I get the error:

RE: RegExp help needed!

2009-12-07 Thread Jowie
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: -- txt txt

RE: RegExp help needed!

2009-12-07 Thread Rebhan, Gilbert
-Original Message- From: Jowie [mailto:joe.n...@mac.com] Sent: Monday, December 07, 2009 1:02 PM To: user@ant.apache.org Subject: RegExp help needed! /* so you would go like that = ... /* hit the send button to soon, should be = so you would go like that = ..

RE: RegExp help needed!

2009-12-07 Thread Rebhan, Gilbert
-Original Message- From: Jowie [mailto:joe.n...@mac.com] Sent: Monday, December 07, 2009 1:02 PM To: user@ant.apache.org Subject: RegExp help needed! /* Hi all, I'm fumbling my way around Ant and finding the help on the web really confusing. I am using Ant simply as a macro copy/downlo