XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Parsing XML with anything but

Original Message From: "Liam R E Quin" <liam@w3.org>
On Mon, 2013-12-09 at 23:10 -0500, Amelia A Lewis wrote:
Hey, Liam!

On Mon, 09 Dec 2013 22:07:09 -0500, Liam R E Quin wrote:
> The "desperate perl hacker" was a significant and much-discussed use
> case during XML development, and was part of why we chose a > self-evident
> empty element syntax.

Mmmmm. I suggest that you didn't succeed. XML, in the general case,
cannot be reliably handled with regular expressions.
But I didn't say that I wrote a parser or that I handled the general
case.

(you can, by the way, use Perl's extended regular expressions to parse
XML reliably, because they can handle nesting correctly, but that's
another matter and not what I'm doing).

And there's a difference between trying to come up with a single regular expression for XML, and using Perl's incremental matching of strings (using the /gc flag) to do 'low-level' tokenisation and glue a bunch of regexs together using higher level code. (Although that most likely just moves it into the possible, but pointless category as Perl already has XML parser libraries if your problem needs that generality.)

Pete Cordell
Codalogic Ltd
C++ tools for C++ programmers, http://codalogic.com
Read & write XML in C++, http://www.xml2cpp.com



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS