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

What's with /MARKUP?

 [1/4] from: ddalley::idirect::com at: 28-Jan-2001 3:21


Hi, Rebols: I just had a first look at LOAD/MARKUP and was hoping that it would strip HTML out of a page. In fact, websplitter.r comes closer to being a stripper, although it still missed a few &codes and spacing is a bit ackward. Since /MARKUP creates a block with the HTML still in it, what is its advantage or how is it useful? Why would we want the HTML? -- ---===///||| Donald Dalley |||\\\===--- The World of AmiBroker Support http://webhome.idirect.com/~ddalley UIN/ICQ#: 65203020

 [2/4] from: al:bri:xtra at: 28-Jan-2001 23:22


Donald wrote:
> Since /MARKUP creates a block with the HTML still in it, what is its
advantage or how is it useful? Why would we want the HTML? So that your code can block parse the HTML and text between the tags, so allowing you to rewrite the HTML code or alter it in any way, like checking for XML/HTML validity, stripping tags and so on. As an example, a web stripper, knowing where the <p> tags are, would allow it to generate a double newline in the output stream to signal a paragraph. Detect a image tag would allow stripping out the ALT text inside and substituting that for the picture. Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/

 [3/4] from: ddalley:idirect at: 28-Jan-2001 10:28


On 28-Jan-01, Andrew Martin wrote:
> So that your code can block parse the HTML and text between the tags, so > allowing you to rewrite the HTML code or alter it in any way, like checking
<<quoted lines omitted: 3>>
> tag would allow stripping out the ALT text inside and substituting that for > the picture.
Thanks, Andrew. The dictionary definition didn't get too detailed in /MARKUP's usage and the only HTML stripper I found didn't use it, so I needed some practical examples. -- ---===///||| Donald Dalley |||\\\===--- The World of AmiBroker Support http://webhome.idirect.com/~ddalley UIN/ICQ#: 65203020

 [4/4] from: rchristiansen:pop:isdfa:sei-it at: 29-Jan-2001 10:02


load/markup separates the tags from the content and places each tag or content as a string! value into a block! You can then check each element of the block to see if it is a tag? or not and remove the element if it is a tag!, leaving the content behind. -Ryan

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted