ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject RE: Retrieving a XML file generated by JavaScript ?
Date Mon, 29 Aug 2005 14:10:39 GMT
> From: Nicolas Vervelle [mailto:nicolas.vervelle@steria.com]
> I want to get the file that is see when I enter the following address
> in my browser :
> http://www.stolaf.edu/people/hansonr/jmol/docs/?xml
> 
> I tried the <get> task but it doesn't download what I need : it
> download the javascript that is used to generate the XML file, not the
> XML file itself.
> 
> Is there any way to get this XML from Ant ?

Probably not. <get> downloads the raw 'file' at the URL. What you want is
the result of executing this 'file' by an application like a web browser
(client side), and it's built-in JavaScript interpreter, which is quite
different.

I guess you could imagine parsing the HTML, extract the JavaScript, and run
it using a Java-based JavaScript interpreter like Rhino, but that would be
quite an undertaking.

The transformation needs to be server-side for <get> to be useful in your
case. Sorry, but <get> gets you raw bytes and nothing more. --DD


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


Mime
View raw message