Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] dtd problems

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: luca <passani AT eunet.no>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] dtd problems
  • Date: Mon, 20 Sep 2004 10:57:01 -0400

luca wrote:


"Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML"


Simple is a relative term. Compared to SGML, XML is indeed simple. Compared to CSV it isn't, at least in theory. In practice, XML actually is as simple as CSV and maybe simpler, because real-world CSV is rarely what people think expect it to be. That's another permathread.


now, I am trying to do something that is achieveble with 5 lines
of Perl code totally (a guru can probably do it from the command line)
using regular expressions.

No, you can't. Regular expressions are insufficiently powerful to handle XML. Details in Item 29 of Effective XML (and if anyone asks nicely, I may put that one online too).


Seen another way, I am trying a use a simple API to do something simple
with a tiny file which uses a simple text format. Yet, it doesn't work.

Where is the disconnect?


You're discovering that XML is not as simple as you were led to believe. If you try to use regular expressions to parse this stuff, you'll likely find a few other areas where XML isn't as simple as you thought. XOM's motto is "As simple as it can be and no simpler!"


--
Elliotte Rusty Harold
elharo AT metalab.unc.edu




Archive powered by MHonArc 2.6.24.

Top of Page