How to extract an entire element from an HTML file?

Trevor DeVore lists at mangomultimedia.com
Mon Nov 26 08:42:46 EST 2018


On Mon, Nov 26, 2018 at 3:30 AM Keith Clarke via use-livecode <
use-livecode at lists.runrev.com> wrote:

> 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.


Keith,

I’ve used revXML for parsing HTML in somewhat controlled conditions. While
revXML can work for HTML, your results will vary based on how well
structured the HTML is. If there are tags that are not closed or are out of
balance then revXML won’t give you the results you expect. If you are
generating the HTML then it shouldn’t be a problem. If it is third party
HTML then you may have to massage the HTML input to get it to work.

It would be great if there were a library wrapper around one of the
dedicated HTML parsers listed on this page:

https://en.m.wikipedia.org/wiki/Comparison_of_HTML_parsers

-- 
Trevor DeVore
ScreenSteps



More information about the use-livecode mailing list