Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: html to text and parsing 2 strings

From: brett:codeconscious at: 8-May-2001 14:23

Hi Ian, There are different ways to go about attacking the problem. Depends what your aim is. Here is one idea - does not use the parse function though. foreach element load/markup [ if string? element [print element] ] If you are after specific part of a web page you can use the parse function. parse/all read [ thru "<title>" copy text to </title> (print text) ] If you are planning on a general tool then you have more complexity to deal with. A web page is a structured document - cells are part of tables for example. But when you have just read the web page into a string that structure does not exist - the page is just a sequence of characters/values. So to do a truly general tool is difficult because you end up having to program something that understands the structure of web pages. Adding to this not all web pages follow the rules... Brett.