How to structure HTML text (tags and attributes) for processing in LiveCode?

Keith Clarke keith.clarke at clarkeandclarke.co.uk
Sun Jun 12 05:27:35 EDT 2011


Hi folks,
Local rainy Saturday night broadband load prevented me from seeing the whole of Colin Holgate's fascinating LiveCode Live presentation on working with web page source HTML text - so I can't wait for the recording!

Meanwhile, I'm trying to extract various html tags and specific attributes from a page's source code - you know, this and that, where <tag>stuff="this" other_stuff="that"</tag>

I'm trying to create the situation where I can iterate through the text using something like 'repeat for each tag' and within that loop, 'repeat for each attribute' - the question is, how to get the source HTML text structured and delimited so that 'HTML tag = line' and 'HTML tag attribute = Item'  

Given there are no obvious single character itemDelimiters in HTML and the inefficiency of building-up an algorithm from scratch with chunk functions, are any specialised resources, techniques or tricks available - maybe I missed something in the libURL feature-set?
Best,
Keith.. 



More information about the Use-livecode mailing list