Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.php Subject: Re: Any recommendations on using PHP to parse marked-up text? Date: Sat, 20 Feb 2016 23:40:07 +0000 Organization: A noiseless patient Spider Lines: 20 Message-ID: <87twl30x48.fsf@bsb.me.uk> References: <8760xj2lhx.fsf@bsb.me.uk> <1893469.h9tBEbt3fS@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="19734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1Ea6q+MjP6YHsPb5DB9DmZ/r6uIKH5W8=" Cancel-Lock: sha1:Rn1If33HgTMQdKGQerj+GLCwMLU= sha1:JuoFE07vSxxl1bxzaLQMEbTOpxQ= X-BSB-Auth: 1.f69f99bd0fd63bd529d4.20160220234007GMT.87twl30x48.fsf@bsb.me.uk Xref: csiph.com comp.lang.php:16551 Thomas 'PointedEars' Lahn writes: > Ben Bacarisse wrote: > >> I though you were doing something like markdown where the markup is made >> very simple indeed, but your use-case may oblige you to use a very much >> more expressive markup. Much as I dislike it, XML has much to offer >> when doing this sort of thing. > > And one does _not_ parse it with (Perl-compatible) regular expressions as > you suggested before, but with an XML *parser* like libxml, which is > supported by PHP. When I suggest XML, I advised using an established XML processor. In fact it's the existing tools that I've stressed as being the main reason to consider XML. I'm sure James is not confused on this point, but you may not have been following the whole thread. -- Ben.