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


Help: OASIS Mailing Lists Help | MarkMail Help



   Standard XML APIs (was Re: CDATA by any other name...)

[ Lists Home | Date Index | Thread Index ]
  • From: <david@megginson.com>
  • To: XML Dev <xml-dev@ic.ac.uk>
  • Date: Tue, 3 Nov 1998 09:29:33 -0500 (EST)

Paul Prescod writes:

 > I find it odd that we can have "standard APIs" for the full
 > complexity of relational data, and probably eventually for object
 > database data, but it is perceived to be impossible to do the same
 > for the parse tree of XML data. I mean it is just annotated tree
 > structures: it shouldn't be rocket science (but neither is it
 > trivial).

Let's divide the use of XML into two fairly arbitrary groups
(acknowledging that there's considerable overlap):

1. Documents
2. Data

Group #1 (documents) is characterised by long sequences of mixed
content inside block-level containers (often paragraphs, but possibly
subtasks or steps in technical documentation); group #2 (data) is
characterised by fairly rigid hierarchies with plain character data
inside named fields (often, but not always, short) appearing in
predictable orders.

A standard XML-oriented API like the DOM is entirely suitable for
group #1, but the DOM is probably overkill for group #2, which
requires a domain-specific API (of course, for small or
non-speed-critical applications, the domain-specific API could be
implemented as an adapter on top of the DOM).

That said, you still need some kind of API to get at the XML to
populate the domain-specific model.  Sometimes, the DOM will be
appropriate, but given that many models in group #2 tend to be simple
and need to be processed on busy servers, a light-weight, event-based
API like XML::Parser or SAX usually makes the most sense for that

Ideally, most programmers using XML for group #2 will never see an
XML-specific API -- we should hide it.

All the best,


David Megginson                 david@megginson.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


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

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