Comments on: SAX: biggest regrets https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/ Open information and technology. Tue, 08 Feb 2005 02:58:08 +0000 hourly 1 http://wordpress.com/ By: Jason Aaron Osgood https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-14 Tue, 08 Feb 2005 02:58:08 +0000 /?p=6#comment-14 Elliotte Rusty Harold wrote:

Technically, you are correct. And yet. Both ByteArrayInputStream.read() and CharArrayReader.read() throw IOException. This is done to enable composition and swapping. For instance, I sometimes use handcoded stuff in unit tests. The advantages outweigh the minor annoyances. So I agree with David Megginson on this one.

]]>
By: Elliotte Rusty Harold https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-13 Sun, 06 Feb 2005 11:06:40 +0000 /?p=6#comment-13 XML parsing is not I/O, and a SAXException is not a kind of IOException. This one you got right. Consider the case of an XML document stored in a String literal. The XOM unit test suite is loaded with these things. No I/O needs to be performed to parse them. Everything already exists within memory. Parsing is a completely separate operation from input and output, and it should be logically separate. Parsing is defined to operate on a sequence of bytes or characters. We often choose to represent that sequence as a stream for the sake of convenience and efficiency. However, we don’t need to. Parsing would work equally well if the data were represented as a byte array, char array, or something else.

There’s also the issue that even parsing a string may cause I/O to be done if an external DTD subset needs to be loaded. However, again the parsing of the XML and the input and output of that XML are two different operations. Problems in one are not problems in the other. They are conceptually distinct.

]]>
By: Norman Walsh https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-11 Thu, 03 Feb 2005 19:59:34 +0000 /?p=6#comment-11 I wonder if I count as one of the twelve? 🙂 SAX is a fabulous piece of work, but I so desperately wish that it passed the base URI and original, possibly relative, system identifier to entityResolver() that it almost makes me want to cry when I think about it.

]]>
By: Quoderat » The complexity of XML parsing APIs https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-16 Tue, 30 Nov -0001 00:00:00 +0000 /?p=6#comment-16 […] ry format then decide to cruft it up by layering a crufty XML API on it is beyond me. [0] http://www.megginson.com/blogs/quoderat/archi […]

]]>
By: Quoderat » The complexity of XML parsing APIs https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-15 Tue, 30 Nov -0001 00:00:00 +0000 /?p=6#comment-15 […] ry format then decide to cruft it up by layering a crufty XML API on it is beyond me. [0] http://www.megginson.com/blogs/quoderat/archi […]

]]>
By: Don Park's Daily Habit - Welcoming David Megginson https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-8 Tue, 30 Nov -0001 00:00:00 +0000 /?p=6#comment-8 […] ginson who led that effort seemingly effortlessly although not without some noteworthy regrets which I agree with.  Wh […]

]]>
By: Quoderat » Blame Larry Wall https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-12 Tue, 30 Nov -0001 00:00:00 +0000 /?p=6#comment-12 […] t into SAX, and one that I sometimes wish we had taken up (though it’s not one of my biggest regrets): represent any XML name […]

]]>
By: Quoderat » SAX: biggest satisfactions https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-10 Tue, 30 Nov -0001 00:00:00 +0000 /?p=6#comment-10 […] ions Filed under: programming — david @ 10:01 pm Recently, I mentioned my biggest regrets about SAX. When we were b […]

]]>
By: Don Park's Daily Habit - Welcoming David Megginson https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-9 Tue, 30 Nov -0001 00:00:00 +0000 /?p=6#comment-9 […] ginson who led that effort seemingly effortlessly although not without some noteworthy regrets which I agree with.  Wh […]

]]>
By: Danny Ayers, Raw Blog https://quoderat.megginson.com/2005/01/31/sax-the-bad-the-good-and-the-controversial/#comment-17 Tue, 30 Nov -0001 00:00:00 +0000 /?p=6#comment-17 […] ng for you and give you a predigested view of the information. Nearby, Megginson’s biggest regrets and biggest satisfactions […]

]]>