I need to export a website(.html page) to a XML file. The website contains a table with some data which i require for using in my web project. The table in the website is formed using some javascript, so i cannot get the data by getting the page source. Please tell me how I can export the table in the website to a XML file using php/python/javascript/perl.
6
-
2What have you tried?– Mihai IorgaCommented Sep 6, 2012 at 8:21
-
this may not be relevant, but would Yahoo! Pipes not help you?– Zathrus WriterCommented Sep 6, 2012 at 8:23
-
I had no idea how to do it. Previously i used to get the source code of the site using a perl script but now i can't do anything. Please help.– HarikrishnanCommented Sep 6, 2012 at 8:24
-
you need a browser engine to load the page and deliver the html– njzk2Commented Sep 6, 2012 at 9:02
-
@njzk2 — That is the other approach that could work. I would have recommended it, but the OP indicated the priority was on execution speed, which makes troelskn's recommendation to reverse engineer the code (which doesn't require a browser engine to be used by the program) the more suitable solution.– QuentinCommented Sep 6, 2012 at 9:05
|
Show 1 more comment
1 Answer
You could try to reverse engineer the javascript code. Maybe it's making an ajax request to a service, that delivers the data as json. Use your browsers developer tools/network tab to see what's going on.
-
I need this to be done in a faster way. Only then will I get a desired output in my project. Won't the above solution take too much time to load? Commented Sep 6, 2012 at 8:28
-
3@HarikrishnanT — No. It will take time to develop. It has the fastest execution time of any of the alternatives.– QuentinCommented Sep 6, 2012 at 8:45