http://qs321.pair.com?node_id=11117405


in reply to Re: Getting start and end xml tags
in thread Getting start and end xml tags

Hi

Thank you for your reply. It's not similar to my previous question.

Replies are listed 'Best First'.
Re^3: Getting start and end xml tags
by marto (Cardinal) on May 28, 2020 at 13:14 UTC

    Your previous questions about working with HTML/XML have had solutions provided using proper parsing modules. The post I linked to was about working with sentences split up by HTML tags, here you have XML. How is this not similar?

Re^3: Getting start and end xml tags
by Fletch (Bishop) on May 28, 2020 at 13:20 UTC

    Unless you are dealing with very trivial, very static (X|HT|SG)ML markup the answer to "How do I do X with my FOOML" is pretty much invariably going to entail starting off "Use a FOOML parsing module, then . . .". See Why a regex *really* isn't good enough for HTML and XML, even for "simple" tasks for a recent, good pathological example why.

    Even if you think you've really got something trivial you're then betting against yourself that that format will never change and have baked an unspoken brittleness into your code.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.