OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   SAX is not a read-only API (wa RE: [xml-dev] re: XML SIG 17...)

[ Lists Home | Date Index | Thread Index ]
  • To: "'Elliotte Rusty Harold'" <elharo@metalab.unc.edu>,<xml-dev@lists.xml.org>
  • Subject: SAX is not a read-only API (wa RE: [xml-dev] re: XML SIG 17...)
  • From: "Aaron Skonnard" <aarons@develop.com>
  • Date: Thu, 12 Sep 2002 11:50:26 -0600
  • Importance: Normal
  • In-reply-to: <p04330107b9a67af28126@[]>

Elliotte Rusty Harold wrote:

> At 11:09 AM -0600 9/12/02, Aaron Skonnard wrote:
> > Since when is SAX a "read-only API"? SAX is simply a suite 
> > of interface definitions for programmatically representing 
> > XML documents. Why does it matter what side of the interface 
> > you're on? It's still SAX.
> Is there a single method call anywhere in the three SAX packages that
> actually creates a fragment of XML? 

I assume you're referring to an XML Infoset, and not XML 1.0, since that
what the API models. If so, sure, characters produces a fragment of XML
in a single call. But why does it matter if it's a single call anyway? A
sequence of calls can model an XML Infoset in an intuitive manner.

> You can create a few helper classes like AttributesImpl. but there's 
> nothing to actually put them in a file or on a stream. 

Who cares where it goes? SAX is about programmatically modeling

> Where are the SAX calls to create a new XML document? 

// document content goes here...

> They don't exist. SAX is a read-only API. It supports
> parsing of XML documents, but has no support whatsoever for creating
> new XML documents, modifying XML documents, or writing them onto
> streams. You can write code to do all this yourself. Just don't
> pretend that code is part of SAX.

The SAX interfaces don't mandate "parsing of XML documents", although
the interfaces can be used for this common task, as well as others. 


. Aaron Skonnard, DevelopMentor (http://skonnard.com).
.  Essential XML Quick Reference available online!   .
.    Download PDFs: http://www.develop.com/books     .


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

Copyright 2001 XML.org. This site is hosted by OASIS