FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Save webpage source into javascript variable

 


orno
I need to save the source of a dynamic webpage into a javascript variable so that I can parse it for some particular details.

Any clues on how this can be done?

Thanks!
Ranfaroth
How do you want to parse it ?
With JavaScript ? Then you just have to get the root element (document.documentElement) and parse its nodes tree.
If you want to output it, in plain text, you can wait for browsers to implement LSSerializer.write function, or you'll have to write your own (base as before on a parsing of the nodes-tree)
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.