Nested tags

Ken Ray kray at sonsothunder.com
Sun Jun 18 11:46:27 EDT 2006


> Hi all,
> 
> I've got a scripting problem that seems ridiculously simple.
> 
> I have to find the corresponding end tag in a HTML file with nested
> <SPAN> tags:
> 
> <SPAN class="FOOTNOTE">
> <SPAN Class="reference">
> origin
> </SPAN>
> <SPAN Class="quote">
> <SPAN Class="smallcaps">
> Text
> </SPAN>
> more text
> </SPAN>
> </SPAN>
> 
> Some of the tags are nested. How do I find the end tag of each SPAN
> tag? The tag on line 1 has its end tag on line 11, but the first time
> it sees </SPAN> is on line 4...

Another idea would be to use the revXML DLL or my XML Library (
http://www.sonsothunder.com/products/xmllib/xmllib.htm) to parse the tags
and give you a way to retrieve the data easily (if that's what you're
looking to do).


Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/






More information about the use-livecode mailing list