[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Parsing XML with anything but

  • From: "Pete Cordell" <petexmldev@codalogic.com>
  • To: <liam@w3.org>,"Amelia A Lewis" <amyzing@t...>
  • Date: Tue, 10 Dec 2013 11:26:47 -0000

Re:  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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.