4 ms·
> Parsing XML is relatively trivial It really isn't, and rolling your own parser is the diametric opposite of the "do the simplest thing" philosophy. The XML
by jiggawatts 1y ago
> Parsing XML is relatively trivial
It really isn't, and rolling your own parser is the diametric opposite of the "do the simplest thing" philosophy.
The XML v1.1 spec is 126 KB of text, and that doesn't even include XML Namespaces, which is a separate spec with 25 KB of text.
XML is only "simple" in the sense of being well-defined, which makes interoperability simple, in some sense. Contrast this with ill-defined or implementation-defined text formats, where it's decidedly not simple to write an interoperable parser.
As an end-user of XML, the simplest thing is to use an off-the-shelf XML parser, one that's had the bugs beaten out of it by millions of users.
There are very few programming languages out that don't have a convenient, full-featured XML parser library ready to use.
- GMoromisato 1y agoWell we can agree that most people shouldn't implement their own XML parser.