You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Dave Dutcher <dj...@earthlink.net> on 2003/01/25 22:00:50 UTC

[OT] Reverse Template Engine?

This isn't a question about Velocity, but I thought it would be easy to
explain my question to Velocity users.

I am looking to write a program to download html from a web site, and then I
want to parse data from the html.  Since the data is probably added to the
html with PHP, JSP, Velocity, or something.  I was thinking it would be cool
to have a tool that took a template a lot like a Velocity template but
parsed data out of a file instead of inserting data into it.  Kind of a
"Reverse Template Engine".

Has anybody heard of a tool like that, or does anybody have any suggestions
for a tool to use?  I guess just regular expressions might be the way to go.
Something like JavaCC is probably overkill for just looking for some data in
a table.

Thanks for any help,

Dave Dutcher


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [OT] Reverse Template Engine?

Posted by Jeff Linwood <je...@greenninja.com>.
Hi,

Have you taken a look at HttpUnit? It makes it pretty easy to retrieve 
content from a URL, and you can set HTTP Authentication, cookies, all 
that good stuff.  It can bring the results into a DOM with either JTidy 
or NekoHTML and then you could get stuff out of a table. It's easier to 
work with than regular expressions or JavaCC.

Jeff

Dave Dutcher wrote:

>This isn't a question about Velocity, but I thought it would be easy to
>explain my question to Velocity users.
>
>I am looking to write a program to download html from a web site, and then I
>want to parse data from the html.  Since the data is probably added to the
>html with PHP, JSP, Velocity, or something.  I was thinking it would be cool
>to have a tool that took a template a lot like a Velocity template but
>parsed data out of a file instead of inserting data into it.  Kind of a
>"Reverse Template Engine".
>
>Has anybody heard of a tool like that, or does anybody have any suggestions
>for a tool to use?  I guess just regular expressions might be the way to go.
>Something like JavaCC is probably overkill for just looking for some data in
>a table.
>
>Thanks for any help,
>
>Dave Dutcher
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>