Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyway to make Flash read all the resource of an HTML file.

Status
Not open for further replies.

123456programmer

Programmer
Aug 3, 2003
105
AU
Hey i need an idea of a script that can actually go throught an Html source and then take an information of just one part.

i want the script to take the information of an html, that are just below some word.
then i want the same script to remember one line, that is between &quot;<**>&quot; and &quot;</**>&quot;
..thanx in advance ;D
 
well, if your HTML was perfectly-formed XML then you could use the built-in XML parser. However, HTML rarely is.

It's fairly easy to build a token parser for HTML, but I'm guessing that you don't want to go that route. My suggestion is to use a Regular Expression parser, and use a regular expression to locate the HTML string within the loaded HTML. You can find a good regexp parsing object for actionscript at:
If you are unfamiliar with regular expressions, they are very easy to use. To cite your example,
Go To: Set string to &quot;<SOMETAG>BLAHBLAHBLAH</SOMETAG>&quot;
Regular Exp to &quot;^.*<SOMETAG>(.*)</SOMETAG>$&quot;
Value Returned in $1 is &quot;BLAHBLAHBLAH&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top