How to extract an entire element from an HTML file?

Keith Clarke keith.clarke at me.com
Mon Nov 26 04:30:21 EST 2018


Thanks for the steer, Paul - I’ve not worked with XML in LiveCode so hadn’t made the connection between the HTML markup structure & XML.

A quick scan through suggests that this library could prove really useful - I’ll dig further and look for related resources, thanks.
Best,
Keith   

> On 25 Nov 2018, at 13:55, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> You could do this with revXML (see teh dictionary), but it is not a
> single call.
> 
> 
> On 11/25/2018 7:12 AM, Keith Clarke via use-livecode wrote:
>> Folks,
>> Can anyone please guide me towards an LiveCode feature(s) that might provide the equivalent to the javascript jQuery library’s "jQuery(‘.class’).html();" mechanism that allows one to select an entire element’s content (including nested elements) from the page DOM?
>> 
>> I have experimented with using jQuery in a browser widget for this purpose but it introduces dependencies & integration complexities - and I’d prefer to work without necessitating a desktop UI to contain for the browser widget, so the code could potentially run on LC Server. 
>> 
>> I can see how I might build a 'roll-your-own' approach, using LiveCode’s powerful text & chunk features. This would seem to need the HTML file to be pre-processed, to iterate through the tags of the text file to both find & mark both each nesting level within elements and also ‘pair-up’ the (anonymous) closing tags.
>> 
>> Is there a smarter way - any HTML parsing utilities/libraries/lessons/stacks I should study?
>> Thanks
>> Keith    
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list